From 54509e5871c2cacb7bfce9c96e71bc079584fd05 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Mon, 23 Mar 2020 10:24:29 +0200 Subject: [PATCH 01/38] add backlog predicate --- src/hunter/__init__.py | 64 +++++++++++++++--------- src/hunter/actions.py | 11 +---- src/hunter/predicates.py | 102 +++++++++++++++++++++++++++++++++++++-- src/hunter/util.py | 16 ++++++ tests/test_predicates.py | 31 ++++++++++++ tests/test_tracer.py | 59 +++++++++++++++++++++- 6 files changed, 246 insertions(+), 37 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 0817b04..37d0019 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -16,28 +16,28 @@ from .actions import Manhole 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 From as _From - from ._predicates import Not as _Not - from ._predicates import Or as _Or - from ._predicates import When - from ._predicates import Query - from ._tracer import Tracer -except ImportError: - from .event import Event # noqa - from .predicates import And as _And - from .predicates import From as _From - from .predicates import Not as _Not - from .predicates import Or as _Or - from .predicates import When - from .predicates import Query - from .tracer import Tracer +# 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 From as _From +# from ._predicates import Not as _Not +# from ._predicates import Or as _Or +# from ._predicates import When +# from ._predicates import Query +# from ._tracer import Tracer +# except ImportError: +from .event import Event # noqa +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 +from .predicates import Query +from .predicates import When +from .tracer import Tracer try: from ._version import version as __version__ @@ -59,6 +59,7 @@ 'VarsPrinter', 'VarsSnooper', 'When', + 'Backlog', 'stop', 'trace', @@ -271,6 +272,25 @@ def From(condition=None, predicate=None, watermark=0, **kwargs): return _From(condition, predicate, watermark) +def Backlog(condition=None, action=CallPrinter, size=None, depth=None, **kwargs): + DEFAULT_DEPTH = 15 + if size is not None and depth is not None: + raise TypeError("Only one of these keyword arguments must be specified: (size, depth)") + + if condition is None: + condition = Q(**kwargs) + elif kwargs: + raise TypeError("Unexpected arguments {}. Don't combine positional with keyword arguments.".format( + kwargs.keys())) + + if size is None and depth is None: + depth = DEFAULT_DEPTH + if inspect.isclass(action): + action = action() + + return _Backlog(condition, action, size, depth) + + def stop(): """ Stop tracing. Restores previous tracer (if there was any). diff --git a/src/hunter/actions.py b/src/hunter/actions.py index 63b2c05..b5a72db 100644 --- a/src/hunter/actions.py +++ b/src/hunter/actions.py @@ -19,6 +19,7 @@ from .util import PY3 from .util import StringType from .util import builtins +from .util import frame_iterator from .util import iter_symbols from .util import safe_repr @@ -791,7 +792,7 @@ def __call__(self, event): frame.f_lineno, frame.f_code.co_name ) - for frame in islice(self.frame_iterator(event.frame.f_back), self.depth) + for frame in islice(frame_iterator(event.frame.f_back), self.depth) ) ) else: @@ -806,11 +807,3 @@ def __call__(self, event): thread_prefix, filename_prefix, ) - - def frame_iterator(self, frame): - """ - Yields frames till there are no more. - """ - while frame: - yield frame - frame = frame.f_back diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 5382b49..b22bc37 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -1,12 +1,14 @@ from __future__ import absolute_import +import collections import inspect import re -from itertools import chain +from itertools import chain, islice from .actions import Action from .event import Event -from .util import StringType +from .util import StringType, clone_event_and_set_attrs +from .util import frame_iterator __all__ = ( 'And', @@ -28,6 +30,10 @@ ) +class BasePredicate(object): + pass + + class Query(object): """ A query class. @@ -82,13 +88,15 @@ def __init__(self, **query): if operator in ('startswith', 'sw'): if not isinstance(value, StringType): 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)) + 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, StringType): 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)) + 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': @@ -643,3 +651,89 @@ def __rand__(self, other): Convenience API so you can do ``other & Not(...)``. It converts that to ``And(other, Not(...))``. """ return And(other, self) + + +class Backlog(object): + def __init__(self, condition, action=None, size=None, depth=None): + self.condition = condition + self.action = action + self.size = size + self.queue = collections.deque(maxlen=size) if size else None + self.depth = depth + self.called = False + + def __call__(self, event): + """ + Handles the event. + """ + if not self.called and self.condition(event): + self.called = True + if self.size: + backlog_events = self.queue + else: + backlog_events = ( + clone_event_and_set_attrs(event, frame=frame, kind='call', arg=None) + for frame in islice(frame_iterator(event.frame.f_back), self.depth) + ) + + for be in backlog_events: + self.action(be) + + return True + + if not self.called and self.size: + self.queue.append(event) + + return False + + def __str__(self): + return 'Backlog(%s, %s, size=%s, depth=%s)' % ( + self.condition, self.action, self.size, self.depth + ) + + def __repr__(self): + return '' % ( + self.condition, self.action, self.size, self.depth + ) + + def __eq__(self, other): + return ( + isinstance(other, Backlog) and + self.condition == other.condition and + self.action == other.action and + self.queue == other.queue and + self.depth == other.depth + ) + + def __hash__(self): + return hash(('Backlog', self.condition, self.action, self.queue, self.depth)) + + def __or__(self, other): + """ + Convenience API so you can do ``From(...) | other``. It converts that to ``Or(From(...), other)``. + """ + return Or(self, other) + + def __and__(self, other): + """ + Convenience API so you can do ``From(...) & other``. It converts that to ``And(From(...), other))``. + """ + return And(self, other) + + def __invert__(self): + """ + Convenience API so you can do ``~From(...)``. It converts that to ``Not(From(...))``. + """ + return Not(self) + + def __ror__(self, other): + """ + Convenience API so you can do ``other | From(...)``. It converts that to ``Or(other, From(...))``. + """ + return Or(other, self) + + def __rand__(self, other): + """ + Convenience API so you can do ``other & From(...)``. It converts that to ``And(other, From(...))``. + """ + return And(other, self) diff --git a/src/hunter/util.py b/src/hunter/util.py index 3372e76..ff9aac0 100644 --- a/src/hunter/util.py +++ b/src/hunter/util.py @@ -185,3 +185,19 @@ def safe_repr(obj, maxdepth=5): # if the object has a __dict__ then it's probably an instance of a pure python class, assume bad things # with side-effects will be going on in __repr__ - use the default instead (object.__repr__) return object.__repr__(obj) + + +def frame_iterator(frame): + """ + Yields frames till there are no more. + """ + while frame: + yield frame + frame = frame.f_back + + +def clone_event_and_set_attrs(event, **kwargs): + new_event = event.clone() + for key, val in kwargs.items(): + setattr(new_event, key, val) + return new_event diff --git a/tests/test_predicates.py b/tests/test_predicates.py index 68bb436..1a7370a 100644 --- a/tests/test_predicates.py +++ b/tests/test_predicates.py @@ -6,6 +6,7 @@ import hunter from hunter import And +from hunter import Backlog from hunter import CallPrinter from hunter import CodePrinter from hunter import Debugger @@ -216,6 +217,22 @@ def test_from(mockevent): assert called +def test_backlog(mockevent): + pytest.raises(AttributeError, Backlog(), 1) + assert Backlog()(mockevent) is True + + called = [] + assert Backlog(Q(module='foo') | Q(module='bar'), lambda: lambda ev: called.append(ev))(mockevent) is False + assert called == [] + + assert Backlog(Not(Q(module='foo') | Q(module='bar')), lambda: lambda ev: called.append(ev))(mockevent) is True + assert called + + called = [] + assert Backlog(Q(module=__name__), lambda: lambda ev: called.append(ev))(mockevent) is True + assert called + + def test_and_or_kwargs(): assert And(1, function=2) == And(1, Query(function=2)) assert Or(1, function=2) == Or(1, Query(function=2)) @@ -227,6 +244,13 @@ def test_from_typeerror(): pytest.raises(TypeError, From, junk=1) +def test_backlog_typeerror(): + pytest.raises(TypeError, Backlog, 1, 2, kind=3) + pytest.raises(TypeError, Backlog, 1, function=2) + pytest.raises(TypeError, Backlog, junk=1) + pytest.raises(TypeError, Backlog, size=1, depth=1) + + def test_and(mockevent): assert And(C(1), C(2)) == And(C(1), C(2)) assert Q(module=1) & Q(module=2) == And(Q(module=1), Q(module=2)) @@ -279,6 +303,12 @@ def test_str_repr(): ) assert str(From(module='a', depth_gte=2)) == "From(Query(module='a'), Query(depth_gte=2), watermark=0)" + assert repr(Backlog(module='a', action=lambda: 'foo', size=2)).replace(', " + "action='foo', size=2, depth=None>" + ) + assert str(Backlog(module='a', action=lambda: 'foo', depth=2)) == "Backlog(Query(module='a'), foo, size=None, depth=2)" + assert repr(Debugger()) == "Debugger(klass=, kwargs={})" assert str(Debugger()) == "Debugger(klass=, kwargs={})" @@ -293,6 +323,7 @@ def test_hashing(): assert (Q(module='a') & Q(function='b')) in {Q(module='a') & Q(function='b')} assert Q(module='a', action=id) in {Q(module='a', action=id)} assert From(module='a', depth_gte=2) in {From(module='a', depth_gte=2)} + assert Backlog(module='a', size=3) in {Backlog(module='a', size=3)} class Foo(object): def __call__(self): diff --git a/tests/test_tracer.py b/tests/test_tracer.py index b3fe3de..beeed88 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -11,6 +11,7 @@ import hunter from hunter import And +from hunter import Backlog from hunter import CallPrinter from hunter import CodePrinter from hunter import Debugger @@ -107,6 +108,14 @@ def __call__(self, *args, **kwargs): assert str(foobar | From(module=1, depth=2)) == 'Or(Foobar, From(Query(module=1), Query(depth=2), watermark=0))' assert str(foobar & ~From(module=1, depth=2)) == 'And(Foobar, Not(From(Query(module=1), Query(depth=2), watermark=0)))' assert str(foobar | ~From(module=1, depth=2)) == 'Or(Foobar, Not(From(Query(module=1), Query(depth=2), watermark=0)))' + assert str(From(module=1, depth=2) & foobar) == 'And(From(Query(module=1), Query(depth=2), watermark=0), Foobar)' + assert str(From(module=1, depth=2) | foobar) == 'Or(From(Query(module=1), Query(depth=2), watermark=0), Foobar)' + assert str(foobar & Backlog(module=1, action=lambda: 'foo', depth=2)) == 'And(Foobar, Backlog(Query(module=1), foo, size=None, depth=2))' + assert str(foobar | Backlog(module=1, action=lambda: 'foo', depth=2)) == 'Or(Foobar, Backlog(Query(module=1), foo, size=None, depth=2))' + assert str(foobar & ~Backlog(module=1, action=lambda: 'foo', depth=2)) == 'And(Foobar, Not(Backlog(Query(module=1), foo, size=None, depth=2)))' + assert str(foobar | ~Backlog(module=1, action=lambda: 'foo', depth=2)) == 'Or(Foobar, Not(Backlog(Query(module=1), foo, size=None, depth=2)))' + assert str(Backlog(module=1, action=lambda: 'foo', depth=2) & foobar) == 'And(Backlog(Query(module=1), foo, size=None, depth=2), Foobar)' + assert str(Backlog(module=1, action=lambda: 'foo', depth=2) | foobar) == 'Or(Backlog(Query(module=1), foo, size=None, depth=2), Foobar)' assert str(Q(module=1) & foobar) == 'And(Query(module=1), Foobar)' assert str(Q(module=1) | foobar) == 'Or(Query(module=1), Foobar)' assert str(~Q(module=1) & foobar) == 'And(Not(Query(module=1)), Foobar)' @@ -115,8 +124,6 @@ def __call__(self, *args, **kwargs): assert str(Q(module=1, action=foobar) | foobar) == 'Or(When(Query(module=1), Foobar), Foobar)' assert str(~Q(module=1, action=foobar) & foobar) == 'And(Not(When(Query(module=1), Foobar)), Foobar)' assert str(~Q(module=1, action=foobar) | foobar) == 'Or(Not(When(Query(module=1), Foobar)), Foobar)' - assert str(From(module=1, depth=2) & foobar) == 'And(From(Query(module=1), Query(depth=2), watermark=0), Foobar)' - assert str(From(module=1, depth=2) | foobar) == 'Or(From(Query(module=1), Query(depth=2), watermark=0), Foobar)' def test_threading_support(LineMatcher): @@ -807,6 +814,54 @@ def test_from_predicate_line_no_predicate(LineMatcher): assert 'one' not in output +def test_backlog_size_predicate(LineMatcher): + backlog_buff = StringIO() + tracer_buff = StringIO() + from sample7 import one + with trace(Backlog(Q(function='five'), size=5, action=CallPrinter(stream=backlog_buff)), action=CallPrinter(stream=tracer_buff)): + one() + backlog_output = backlog_buff.getvalue() + lm = LineMatcher(backlog_output.splitlines()) + lm.fnmatch_lines([ + "* line for i in range(1): # three", + "* line four()", + "* call => four()", + "* line for i in range(1): # four", + "* line five()", + ]) + assert '=> three' not in backlog_output + assert '=> five()' not in backlog_output + assert 'two' not in backlog_output + assert 'one' not in backlog_output + + tracer_output = tracer_buff.getvalue() + assert len(tracer_output.splitlines()) == 1 + assert "call => five()" in tracer_buff.getvalue() + + +def test_backlog_size_predicate_line(LineMatcher): + buff = StringIO() + from sample7 import one + with trace(Backlog(Q(fullsource_has='return i'), size=5, action=CallPrinter(stream=buff))): + one() + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + # "* line for i in range(1): # four", + "* line five()", + "* call => five()", + "* line in_five = 1", + "* line for i in range(1): # five", + "* line return i" + ]) + + # assert 'four' not in output + # assert 'three' not in output + # assert 'two' not in output + # assert 'one' not in output + + def decorator(func): @functools.wraps(func) def wrapper(*a, **k): From a03ed85a6ddf426af5f8fee4afbee6dc0e028315 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Wed, 25 Mar 2020 18:30:17 +0200 Subject: [PATCH 02/38] add filter to backlog --- src/hunter/__init__.py | 29 +++++++++++++--------- src/hunter/actions.py | 2 +- src/hunter/event.py | 13 +++++++--- src/hunter/predicates.py | 53 +++++++++++++++++++++++++++------------- tests/sample7.py | 2 ++ tests/test_tracer.py | 6 ++--- 6 files changed, 69 insertions(+), 36 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 37d0019..8a76f2c 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -272,23 +272,30 @@ def From(condition=None, predicate=None, watermark=0, **kwargs): return _From(condition, predicate, watermark) -def Backlog(condition=None, action=CallPrinter, size=None, depth=None, **kwargs): - DEFAULT_DEPTH = 15 - if size is not None and depth is not None: - raise TypeError("Only one of these keyword arguments must be specified: (size, depth)") +def Backlog(condition=None, action=CallPrinter, size=100, stack_depth=0, **kwargs): + condition = _get_condition(condition, kwargs) + if inspect.isclass(action): + action = action() + + return _Backlog(condition, action, size, stack_depth) + + +def _backlog_filter(self, condition=None, **kwargs): + self.filter_condition = _get_condition(condition, kwargs) + return self + +_Backlog.filter = _backlog_filter + + +def _get_condition(condition, kwargs): if condition is None: - condition = Q(**kwargs) + return Q(**kwargs) elif kwargs: raise TypeError("Unexpected arguments {}. Don't combine positional with keyword arguments.".format( kwargs.keys())) - if size is None and depth is None: - depth = DEFAULT_DEPTH - if inspect.isclass(action): - action = action() - - return _Backlog(condition, action, size, depth) + return condition def stop(): diff --git a/src/hunter/actions.py b/src/hunter/actions.py index b5a72db..797294d 100644 --- a/src/hunter/actions.py +++ b/src/hunter/actions.py @@ -419,10 +419,10 @@ class CallPrinter(CodePrinter): .. versionadded:: 1.2.0 """ EVENT_COLORS = CALL_COLORS + locals = defaultdict(list) def __init__(self, *args, **kwargs): super(CallPrinter, self).__init__(*args, **kwargs) - self.locals = defaultdict(list) def __call__(self, event): """ diff --git a/src/hunter/event.py b/src/hunter/event.py index 25a03e0..676199e 100644 --- a/src/hunter/event.py +++ b/src/hunter/event.py @@ -40,7 +40,12 @@ class Event(object): depth = None calls = None - def __init__(self, frame, kind, arg, tracer): + def __init__(self, frame, kind, arg, tracer=None, depth=None, calls=-1, threading_support=False): + if tracer: + depth = tracer.depth + calls = tracer.calls + threading_support = tracer.threading_support # just for the moment, we need to think more about this + #: The original Frame object. #: #: .. note:: @@ -61,12 +66,12 @@ def __init__(self, frame, kind, arg, tracer): #: Tracing depth (increases on calls, decreases on returns) #: #: :type: int - self.depth = tracer.depth + self.depth = depth #: A counter for total number of calls up to this Event. #: #: :type: int - self.calls = tracer.calls + self.calls = calls #: A copy of the :attr:`hunter.tracer.Tracer.threading_support` flag. #: @@ -75,7 +80,7 @@ def __init__(self, frame, kind, arg, tracer): #: Not allowed in the builtin predicates. You may access it from your custom predicate though. #: #: :type: bool or None - self.threading_support = tracer.threading_support + self.threading_support = threading_support #: Flag that is ``True`` if the event was created with :meth:`~hunter.event.Event.detach`. #: diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index b22bc37..df5e031 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -654,46 +654,65 @@ def __rand__(self, other): class Backlog(object): - def __init__(self, condition, action=None, size=None, depth=None): + def __init__(self, condition, action=None, size=100, stack_depth=0): self.condition = condition self.action = action self.size = size - self.queue = collections.deque(maxlen=size) if size else None - self.depth = depth + self.queue = collections.deque(maxlen=size) + self.stack_depth = stack_depth self.called = False + self.filter_condition = lambda _: True + def __call__(self, event): """ Handles the event. """ if not self.called and self.condition(event): self.called = True - if self.size: - backlog_events = self.queue - else: - backlog_events = ( - clone_event_and_set_attrs(event, frame=frame, kind='call', arg=None) - for frame in islice(frame_iterator(event.frame.f_back), self.depth) - ) - - for be in backlog_events: + for be in self._backlog_events_iter(event): self.action(be) return True - if not self.called and self.size: + if not self.called and self.size and self.filter_condition(event): self.queue.append(event) return False + def _backlog_events_iter(self, event): + depth = self._compute_depth(event) + first_frame = self.queue[0].frame if self.queue else event.frame + + stack_events = [ + Event(frame=frame, kind='call', arg=None) + for frame in islice(frame_iterator(first_frame.f_back), depth) + ] + stack_events.reverse() + yield from iter(stack_events) + yield from iter(self.queue) + + def _compute_depth(self, event): + if not self.size: + return self.stack_depth + elif len(self.queue) > 1: + backlog_depth_length = abs(event.depth - self.queue[0].depth) + depth = self.stack_depth - backlog_depth_length + if depth > 0: + return depth + else: + return self.stack_depth + + return 0 + def __str__(self): return 'Backlog(%s, %s, size=%s, depth=%s)' % ( - self.condition, self.action, self.size, self.depth + self.condition, self.action, self.size, self.stack_depth ) def __repr__(self): return '' % ( - self.condition, self.action, self.size, self.depth + self.condition, self.action, self.size, self.stack_depth ) def __eq__(self, other): @@ -702,11 +721,11 @@ def __eq__(self, other): self.condition == other.condition and self.action == other.action and self.queue == other.queue and - self.depth == other.depth + self.stack_depth == other.stack_depth ) def __hash__(self): - return hash(('Backlog', self.condition, self.action, self.queue, self.depth)) + return hash(('Backlog', self.condition, self.action, self.queue, self.stack_depth)) def __or__(self, other): """ diff --git a/tests/sample7.py b/tests/sample7.py index 66daec1..643cf51 100644 --- a/tests/sample7.py +++ b/tests/sample7.py @@ -2,6 +2,8 @@ import os import sys +import hunter +hunter.trace(hunter.Backlog(source_has='four', size=10, stack_depth=10).filter(source_has='two')) def one(): diff --git a/tests/test_tracer.py b/tests/test_tracer.py index beeed88..96b306e 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -836,7 +836,7 @@ def test_backlog_size_predicate(LineMatcher): tracer_output = tracer_buff.getvalue() assert len(tracer_output.splitlines()) == 1 - assert "call => five()" in tracer_buff.getvalue() + assert "call => five()" in tracer_buff.getvalue() def test_backlog_size_predicate_line(LineMatcher): @@ -848,12 +848,12 @@ def test_backlog_size_predicate_line(LineMatcher): print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - # "* line for i in range(1): # four", + "* line for i in range(1): # four", "* line five()", "* call => five()", "* line in_five = 1", "* line for i in range(1): # five", - "* line return i" + # "* line return i" ]) # assert 'four' not in output From f40485ed62b34d26f76dce6c475e0611523b5900 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Thu, 26 Mar 2020 20:16:05 +0200 Subject: [PATCH 03/38] add tests for backlog size with filter --- src/hunter/event.py | 10 +++-- src/hunter/predicates.py | 50 +++++++++++++--------- tests/sample7.py | 7 +++- tests/test_predicates.py | 25 +++++++++++ tests/test_tracer.py | 89 +++++++++++++++++++++++++++++++++++----- 5 files changed, 146 insertions(+), 35 deletions(-) diff --git a/src/hunter/event.py b/src/hunter/event.py index 676199e..f832c2f 100644 --- a/src/hunter/event.py +++ b/src/hunter/event.py @@ -12,6 +12,7 @@ from .const import SYS_PREFIX_PATHS from .util import CYTHON_SUFFIX_RE from .util import LEADING_WHITESPACE_RE +from .util import MISSING from .util import cached_property from .util import get_func_in_mro from .util import get_main_thread @@ -40,11 +41,14 @@ class Event(object): depth = None calls = None - def __init__(self, frame, kind, arg, tracer=None, depth=None, calls=-1, threading_support=False): - if tracer: + def __init__(self, frame, kind, arg, tracer=None, depth=MISSING, calls=MISSING, threading_support=MISSING): + if tracer is None: + if MISSING 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 # just for the moment, we need to think more about this + threading_support = tracer.threading_support #: The original Frame object. #: diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index df5e031..dd1f70a 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -676,34 +676,44 @@ def __call__(self, event): return True if not self.called and self.size and self.filter_condition(event): + event.detach() self.queue.append(event) return False def _backlog_events_iter(self, event): - depth = self._compute_depth(event) - first_frame = self.queue[0].frame if self.queue else event.frame + stack_events_length = self._compute_stack_events_length(event) + first_event = self.queue[0] if self.queue else event + first_frame = first_event.frame + initial_event_depth = first_event.depth + + if first_event.kind == 'call': + first_frame = first_frame.f_back + initial_event_depth -= 1 stack_events = [ - Event(frame=frame, kind='call', arg=None) - for frame in islice(frame_iterator(first_frame.f_back), depth) + Event( + frame=frame, kind='call', arg=None, + threading_support=event.threading_support, + depth=initial_event_depth - i, calls=-1 + ) + for i, frame in enumerate(islice(frame_iterator(first_frame), stack_events_length)) ] stack_events.reverse() yield from iter(stack_events) yield from iter(self.queue) - def _compute_depth(self, event): - if not self.size: - return self.stack_depth - elif len(self.queue) > 1: - backlog_depth_length = abs(event.depth - self.queue[0].depth) - depth = self.stack_depth - backlog_depth_length - if depth > 0: - return depth - else: - return self.stack_depth + def _compute_stack_events_length(self, event): + if len(self.queue) > 1: + backlog_depth_length = event.depth - self.queue[0].depth + if backlog_depth_length > 0: + stack_events_length = self.stack_depth - backlog_depth_length + if stack_events_length > 0: + return stack_events_length + else: + return 0 - return 0 + return self.stack_depth def __str__(self): return 'Backlog(%s, %s, size=%s, depth=%s)' % ( @@ -729,30 +739,30 @@ def __hash__(self): def __or__(self, other): """ - Convenience API so you can do ``From(...) | other``. It converts that to ``Or(From(...), other)``. + Convenience API so you can do ``Backlog(...) | other``. It converts that to ``Or(Backlog(...), other)``. """ return Or(self, other) def __and__(self, other): """ - Convenience API so you can do ``From(...) & other``. It converts that to ``And(From(...), other))``. + Convenience API so you can do ``Backlog(...) & other``. It converts that to ``And(Backlog(...), other))``. """ return And(self, other) def __invert__(self): """ - Convenience API so you can do ``~From(...)``. It converts that to ``Not(From(...))``. + Convenience API so you can do ``~Backlog(...)``. It converts that to ``Not(Backlog(...))``. """ return Not(self) def __ror__(self, other): """ - Convenience API so you can do ``other | From(...)``. It converts that to ``Or(other, From(...))``. + Convenience API so you can do ``other | Backlog(...)``. It converts that to ``Or(other, Backlog(...))``. """ return Or(other, self) def __rand__(self, other): """ - Convenience API so you can do ``other & From(...)``. It converts that to ``And(other, From(...))``. + Convenience API so you can do ``other & Backlog(...)``. It converts that to ``And(other, Backlog(...))``. """ return And(other, self) diff --git a/tests/sample7.py b/tests/sample7.py index 643cf51..f66aaa9 100644 --- a/tests/sample7.py +++ b/tests/sample7.py @@ -3,7 +3,12 @@ import os import sys import hunter -hunter.trace(hunter.Backlog(source_has='four', size=10, stack_depth=10).filter(source_has='two')) +# hunter.trace(hunter.Backlog(source_has='four', kind='call', size=2, stack_depth=10))#.filter(source_has='five')) +# hunter.trace(hunter.Backlog(fullsource_has='return i', size=5)) +# hunter.trace( + #hunter.Backlog(fullsource_has='return i', size=5).filter(~hunter.Q(fullsource_has="five")), + # hunter.Q(fullsource_has='return i') | hunter.Q(fullsource_contains='three') | hunter.Q(fullsource_contains='four'), kind_in=['call', 'line'] + # ) def one(): diff --git a/tests/test_predicates.py b/tests/test_predicates.py index 1a7370a..ab4498a 100644 --- a/tests/test_predicates.py +++ b/tests/test_predicates.py @@ -233,6 +233,31 @@ def test_backlog(mockevent): assert called +def test_backlog_predicate(): + assert isinstance(Backlog().action, CallPrinter) + assert isinstance(Backlog(action=CallPrinter).action, CallPrinter) + + class FakeAction: + called = False + + def __init__(self): + FakeAction.called = True + + assert not FakeAction.called + assert isinstance(Backlog(action=FakeAction).action, FakeAction) + assert FakeAction.called + + class FakeAction: + not_called = True + + def __call__(self): + FakeAction.not_called = False + + assert FakeAction.not_called + assert isinstance(Backlog(action=FakeAction()).action, FakeAction) + assert FakeAction.not_called + + def test_and_or_kwargs(): assert And(1, function=2) == And(1, Query(function=2)) assert Or(1, function=2) == Or(1, Query(function=2)) diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 96b306e..7d979c1 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -814,11 +814,14 @@ def test_from_predicate_line_no_predicate(LineMatcher): assert 'one' not in output -def test_backlog_size_predicate(LineMatcher): +def test_backlog_size_call(LineMatcher): backlog_buff = StringIO() tracer_buff = StringIO() from sample7 import one - with trace(Backlog(Q(function='five'), size=5, action=CallPrinter(stream=backlog_buff)), action=CallPrinter(stream=tracer_buff)): + with trace( + Backlog(function='five', size=5, action=CallPrinter(stream=backlog_buff)), + action=CallPrinter(stream=tracer_buff) + ): one() backlog_output = backlog_buff.getvalue() lm = LineMatcher(backlog_output.splitlines()) @@ -836,16 +839,19 @@ def test_backlog_size_predicate(LineMatcher): tracer_output = tracer_buff.getvalue() assert len(tracer_output.splitlines()) == 1 - assert "call => five()" in tracer_buff.getvalue() + assert " call => five()" in tracer_output -def test_backlog_size_predicate_line(LineMatcher): +def test_backlog_size_line(LineMatcher): buff = StringIO() + tracer_buff = StringIO() from sample7 import one - with trace(Backlog(Q(fullsource_has='return i'), size=5, action=CallPrinter(stream=buff))): + with trace( + Backlog(fullsource_has='return i', size=5, action=CallPrinter(stream=buff)), + action=CallPrinter(stream=tracer_buff) + ): one() output = buff.getvalue() - print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ "* line for i in range(1): # four", @@ -853,13 +859,74 @@ def test_backlog_size_predicate_line(LineMatcher): "* call => five()", "* line in_five = 1", "* line for i in range(1): # five", - # "* line return i" ]) - # assert 'four' not in output - # assert 'three' not in output - # assert 'two' not in output - # assert 'one' not in output + assert 'four' not in output + + tracer_output = tracer_buff.getvalue() + assert len(tracer_output.splitlines()) == 1 + assert " line return i" in tracer_output + + +def test_backlog_size_call_filter(LineMatcher): + buff = StringIO() + tracer_buff = StringIO() + from sample7 import one + with trace( + Backlog(function='five', size=5, action=CallPrinter(stream=buff)).filter(~Q(fullsource_has='four')), + action=CallPrinter(stream=tracer_buff) + ): + one() + output = buff.getvalue() + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "* line for i in range(1): # two", + "* line three()", + "* call => three()", + "* line for i in range(1): # three", + "* line five()", + ]) + assert "four" not in output + + tracer_output = tracer_buff.getvalue() + assert len(tracer_output.splitlines()) == 1 + assert " call => five()" in tracer_buff.getvalue() + + +def test_backlog_size_predicate_line_filter(LineMatcher): + buff = StringIO() + tracer_buff = StringIO() + from sample7 import one + with trace( + Backlog(fullsource_has='return i', size=5, action=CallPrinter(stream=buff)).filter(~Q(fullsource_has="five")), + action=CallPrinter(stream=tracer_buff) + ): + one() + output = buff.getvalue() + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "* call => three()", + "* line for i in range(1): # three", + "* line four()", + "* call => four()", + "* line for i in range(1): # four", + ]) + + assert "five" not in output + + tracer_output = tracer_buff.getvalue() + assert len(tracer_output.splitlines()) == 1 + assert " line return i" in tracer_output + + +def test_backlog_size_first_line_match(LineMatcher): + buff = StringIO() + tracer_buff = StringIO() + from sample7 import one + with trace(Backlog(fullsource_has='one', module_rx='sample7', size=100, action=CallPrinter(stream=buff)).filter(fullsource_has='one'), action=CallPrinter(stream=tracer_buff)): + one() + output = buff.getvalue() + assert not output def decorator(func): From 76786c9671d0ec137c6c5743f244b7e22bc5e95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 27 Mar 2020 15:53:32 +0200 Subject: [PATCH 04/38] Add two integration tests for the backlog. --- tests/sample7.py | 20 +++------ tests/test_integration.py | 93 ++++++++++++++++++++++++++++++++++----- 2 files changed, 89 insertions(+), 24 deletions(-) diff --git a/tests/sample7.py b/tests/sample7.py index f66aaa9..957c379 100644 --- a/tests/sample7.py +++ b/tests/sample7.py @@ -1,23 +1,15 @@ from __future__ import print_function -import os -import sys -import hunter -# hunter.trace(hunter.Backlog(source_has='four', kind='call', size=2, stack_depth=10))#.filter(source_has='five')) -# hunter.trace(hunter.Backlog(fullsource_has='return i', size=5)) -# hunter.trace( - #hunter.Backlog(fullsource_has='return i', size=5).filter(~hunter.Q(fullsource_has="five")), - # hunter.Q(fullsource_has='return i') | hunter.Q(fullsource_contains='three') | hunter.Q(fullsource_contains='four'), kind_in=['call', 'line'] - # ) - - -def one(): + +def one(a=123, b='234'): for i in range(1): # one + a = b = None two() -def two(): +def two(c={'3': [4, 5]}): for i in range(1): # two + c['side'] = 'effect' three() @@ -34,7 +26,7 @@ def four(): def five(): in_five = 1 for i in range(1): # five - return i + return i # five if __name__ == "__main__": diff --git a/tests/test_integration.py b/tests/test_integration.py index 2c152a3..b6a2eed 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -7,9 +7,9 @@ from pprint import pprint import pytest +from fields import Namespace -import hunter -from hunter import CallPrinter +from hunter import CallPrinter, trace, Backlog from hunter import CodePrinter from hunter import Debugger from hunter import ErrorSnooper @@ -17,7 +17,7 @@ from hunter import VarsPrinter from hunter import VarsSnooper from hunter import When -from hunter.actions import StackPrinter +from hunter import StackPrinter try: from cStringIO import StringIO @@ -153,7 +153,7 @@ def test_pth_sample2(LineMatcher): def test_tracing_bare(LineMatcher): lines = StringIO() - with hunter.trace(CodePrinter(stream=lines)): + with trace(CodePrinter(stream=lines)): def a(): return 1 @@ -175,7 +175,7 @@ def a(): def test_tracing_reinstall(LineMatcher): lines = StringIO() - with hunter.trace(CodePrinter(stream=lines)): + with trace(CodePrinter(stream=lines)): def foo(): a = 2 sys.settrace(sys.gettrace()) @@ -207,7 +207,7 @@ def bar(): def test_tracer_autostop(): - with hunter.trace(lambda: garbage) as tracer: + with trace(lambda: garbage) as tracer: if os.environ.get("SETUPPY_CFLAGS") == "-DCYTHON_TRACE=1": assert sys.gettrace() is not tracer else: @@ -226,7 +226,7 @@ def main(): else: os._exit(0) # child - with hunter.trace(actions=[Action(force_pid=force_pid, stream=sys.stdout), + with trace(actions=[Action(force_pid=force_pid, stream=sys.stdout), VarsPrinter('a', force_pid=force_pid, stream=sys.stdout)], stdlib=False, threading_support=True): @@ -257,7 +257,7 @@ def __init__(self, foobar=1): def set_trace(self, frame): calls.append(frame.f_code.co_name) - with hunter.trace( + with trace( lambda event: event.locals.get('node') == 'Foobar', module=__name__, function='foo', @@ -574,7 +574,7 @@ def a(): def test_stack_printer_1(LineMatcher): buff = StringIO() - with hunter.trace(Q(function="five", action=StackPrinter(limit=1, stream=buff))): + with trace(Q(function="five", action=StackPrinter(limit=1, stream=buff))): from sample7 import one one() @@ -587,7 +587,7 @@ def test_stack_printer_1(LineMatcher): def test_stack_printer_2(LineMatcher): buff = StringIO() - with hunter.trace(Q(function="five", action=StackPrinter(limit=2, stream=buff))): + with trace(Q(function="five", action=StackPrinter(limit=2, stream=buff))): from sample7 import one one() @@ -596,3 +596,76 @@ def test_stack_printer_2(LineMatcher): lm.fnmatch_lines([ "*sample7.py:??:five <= tests/sample7.py:??:four <= tests/sample7.py:??:three <= tests/sample7.py:??:two <= tests/sample7.py:?:one <= tests/test_integration.py:???:test_stack_printer*", ]) + + +def test_backlog_before_return(LineMatcher): + buff = StringIO() + with trace( + Backlog(fullsource_has='return i', size=10, stack=6, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))), force_colors=1)), + action=CallPrinter(stream=buff) + ): + from sample7 import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*tegration.py:* call => test_backlog(LineMatcher=*)", + "*sample7.py:6 call => one()", + "*sample7.py:11 call => two()", + "*sample7.py:11 line three()", + "*sample7.py:14 call => three()", + "*sample7.py:15 line for i in range(1): # three", + "*sample7.py:16 line four()", + "*sample7.py:19 call => four()", + "*sample7.py:20 line for i in range(1): # four", + "*sample7.py:21 line five()", + "*sample7.py:24 call => five()", + "*sample7.py:25 line in_five = 1", + "*sample7.py:26 line for i in range(1): # five", + "DONE backlog." + "*sample7.py:27 line return i # five", + ]) + + +def test_backlog_before_call(LineMatcher): + buff = StringIO() + with trace( + Backlog(function='five', size=5, stack=5, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))), force_colors=1)), + action=CallPrinter(stream=buff) + + ): + from sample7 import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*tegration.py:* call => test_backlog(LineMatcher=*)", + "*sample7.py:6 call => one()", + "*sample7.py:11 call => two()", + "*sample7.py:11 line three()", + "*sample7.py:14 call => three()", + "*sample7.py:15 line for i in range(1): # three", + "*sample7.py:16 line four()", + "*sample7.py:19 call => four()", + "*sample7.py:20 line for i in range(1): # four", + "*sample7.py:21 line five()", + "*sample7.py:24 call => five()", + "*sample7.py:25 line in_five = 1", + "*sample7.py:26 line for i in range(1): # five", + "DONE backlog." + "*sample7.py:27 line return i # five", + ]) From 24e9d1960ee1e83b166ac82b9d9458e838782d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Fri, 27 Mar 2020 22:17:48 +0200 Subject: [PATCH 05/38] Add a cleanup api and rework the backlog. Remove self.called. --- src/hunter/__init__.py | 55 ++++++++++--------- src/hunter/actions.py | 10 +++- src/hunter/event.py | 4 ++ src/hunter/predicates.py | 113 +++++++++++++++++++------------------- tests/sample7.py | 18 +++--- tests/test_integration.py | 104 ++++++++++++++++++++++------------- 6 files changed, 174 insertions(+), 130 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 8a76f2c..6be984b 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -8,36 +8,37 @@ import warnings import weakref -from .actions import Action +from .actions import Action, ColorStreamAction from .actions import CallPrinter from .actions import CodePrinter from .actions import Debugger from .actions import ErrorSnooper from .actions import Manhole +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 From as _From -# from ._predicates import Not as _Not -# from ._predicates import Or as _Or -# from ._predicates import When -# from ._predicates import Query -# from ._tracer import Tracer -# except ImportError: -from .event import Event # noqa -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 -from .predicates import Query -from .predicates import When -from .tracer import Tracer +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 From as _From + from ._predicates import Not as _Not + from ._predicates import Or as _Or + from ._predicates import When + from ._predicates import Query + from ._tracer import Tracer +except ImportError: + from .event import Event # noqa + 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 + from .predicates import Query + from .predicates import When + from .tracer import Tracer try: from ._version import version as __version__ @@ -56,6 +57,7 @@ 'Or', 'Q', 'Query', + 'StackPrinter', 'VarsPrinter', 'VarsSnooper', 'When', @@ -272,12 +274,15 @@ def From(condition=None, predicate=None, watermark=0, **kwargs): return _From(condition, predicate, watermark) -def Backlog(condition=None, action=CallPrinter, size=100, stack_depth=0, **kwargs): +def Backlog(condition=None, filter=None, size=100, stack=0, action=CallPrinter, **kwargs): condition = _get_condition(condition, kwargs) if inspect.isclass(action): action = action() - return _Backlog(condition, action, size, stack_depth) + if not isinstance(action, ColorStreamAction): + raise TypeError("Action %r must be an instance of ColorStreamAction." % action) + + return _Backlog(condition, filter=filter, size=size, stack=stack, action=action) def _backlog_filter(self, condition=None, **kwargs): diff --git a/src/hunter/actions.py b/src/hunter/actions.py index 797294d..de76aa6 100644 --- a/src/hunter/actions.py +++ b/src/hunter/actions.py @@ -335,6 +335,9 @@ def output(self, format_str, *args, **kwargs): **dict(self.other_colors, **kwargs) )) + def cleanup(self): + pass + class CodePrinter(ColorStreamAction): """ @@ -419,8 +422,13 @@ class CallPrinter(CodePrinter): .. versionadded:: 1.2.0 """ EVENT_COLORS = CALL_COLORS + locals = defaultdict(list) + @classmethod + def cleanup(cls): + cls.locals = defaultdict(list) + def __init__(self, *args, **kwargs): super(CallPrinter, self).__init__(*args, **kwargs) @@ -537,7 +545,7 @@ def __call__(self, event): for code, symbols in self.names.items(): try: obj = eval(code, dict(vars(builtins), **event.globals), event.locals) - except AttributeError: + except (AttributeError, KeyError): continue except Exception as exc: printout = '{INTERNAL-FAILURE}FAILED EVAL: {INTERNAL-DETAIL}{!r}'.format(exc, **self.other_colors) diff --git a/src/hunter/event.py b/src/hunter/event.py index f832c2f..e37a2b6 100644 --- a/src/hunter/event.py +++ b/src/hunter/event.py @@ -63,6 +63,8 @@ def __init__(self, frame, kind, arg, tracer=None, depth=MISSING, calls=MISSING, #: #: :type: str self.kind = kind + self.is_call = kind == 'call' + self.is_line = kind == 'line' #: A value that depends on ``kind`` self.arg = arg @@ -148,6 +150,8 @@ def __call__(self, event): event.calls = self.calls event.depth = self.depth event.kind = self.kind + event.is_call = self.is_call + event.is_line = self.is_line event.detached = True diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index dd1f70a..3fb1563 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -364,8 +364,8 @@ class From(object): ``event`` will return ``predicate(event)`` until ``event.depth - watermark`` is equal to the depth that was saved. Args: - condition (callable): A callable that returns True/False or a :class:`~hunter.predicates.Query` object. - predicate (callable): Optional callable that returns True/False or a :class:`~hunter.predicates.Query` object to + condition (callable): Optional :class:`~hunter.predicates.Query` object or a callable that returns True/False. + predicate (callable): Optional :class:`~hunter.predicates.Query` object or a callable that returns True/False to run after ``condition`` first returns ``True``. Note that this predicate will be called with a event-copy that has adjusted :attr:`~hunter.event.Event.depth` and :attr:`~hunter.event.Event.calls` to the initial point where the ``condition`` matched. In other words they will be relative. @@ -654,75 +654,72 @@ def __rand__(self, other): class Backlog(object): - def __init__(self, condition, action=None, size=100, stack_depth=0): - self.condition = condition + def __init__(self, condition, filter, action=None, size=100, stack=10, vars=False): self.action = action - self.size = size - self.queue = collections.deque(maxlen=size) - self.stack_depth = stack_depth self.called = False - - self.filter_condition = lambda _: True + self.condition = condition + self.queue = collections.deque(maxlen=size) + self.queue_filter = filter + self.size = size + self.stack = stack + self.vars = vars def __call__(self, event): """ Handles the event. """ - if not self.called and self.condition(event): - self.called = True - for be in self._backlog_events_iter(event): - self.action(be) - - return True - - if not self.called and self.size and self.filter_condition(event): - event.detach() - self.queue.append(event) - - return False - - def _backlog_events_iter(self, event): - stack_events_length = self._compute_stack_events_length(event) - first_event = self.queue[0] if self.queue else event - first_frame = first_event.frame - initial_event_depth = first_event.depth - - if first_event.kind == 'call': - first_frame = first_frame.f_back - initial_event_depth -= 1 - - stack_events = [ - Event( - frame=frame, kind='call', arg=None, - threading_support=event.threading_support, - depth=initial_event_depth - i, calls=-1 - ) - for i, frame in enumerate(islice(frame_iterator(first_frame), stack_events_length)) - ] - stack_events.reverse() - yield from iter(stack_events) - yield from iter(self.queue) - - def _compute_stack_events_length(self, event): - if len(self.queue) > 1: - backlog_depth_length = event.depth - self.queue[0].depth - if backlog_depth_length > 0: - stack_events_length = self.stack_depth - backlog_depth_length - if stack_events_length > 0: - return stack_events_length - else: - return 0 + result = self.condition(event) + if result: + if self.queue: + self.action.cleanup() + + first_event = self.queue[0] + first_depth = first_event.depth - first_event.is_call + missing_depth = max(0, self.stack + first_depth - event.depth) + if missing_depth: + if first_event.is_call: + first_frame = first_event.frame.f_back + else: + first_frame = first_event.frame + if first_frame: + stack_events = collections.deque() + for depth_delta, frame in enumerate(islice(frame_iterator(first_frame), missing_depth)): + stack_event = Event( + frame=frame, kind='call', arg=None, + threading_support=event.threading_support, + depth=first_depth - depth_delta, calls=-1 + ) + if not self.vars: + # noinspection PyPropertyAccess + stack_event.locals = {} + stack_event.detached = True + stack_events.appendleft(stack_event) + for stack_event in stack_events: + if self.queue_filter is None: + self.action(stack_event) + elif self.queue_filter(stack_event): + self.action(stack_event) + for backlog_event in self.queue: + if self.queue_filter is None: + self.action(backlog_event) + elif self.queue_filter(backlog_event): + self.action(backlog_event) + self.queue.clear() + else: + detached_event = event.detach(self.action.try_repr if self.vars else None) + detached_event.frame = event.frame + self.queue.append(detached_event) - return self.stack_depth + return result def __str__(self): return 'Backlog(%s, %s, size=%s, depth=%s)' % ( - self.condition, self.action, self.size, self.stack_depth + self.condition, self.action, self.size, self.stack ) def __repr__(self): return '' % ( - self.condition, self.action, self.size, self.stack_depth + self.condition, self.action, self.size, self.stack ) def __eq__(self, other): @@ -731,11 +728,11 @@ def __eq__(self, other): self.condition == other.condition and self.action == other.action and self.queue == other.queue and - self.stack_depth == other.stack_depth + self.stack == other.stack ) def __hash__(self): - return hash(('Backlog', self.condition, self.action, self.queue, self.stack_depth)) + return hash(('Backlog', self.condition, self.action, self.queue, self.stack)) def __or__(self, other): """ diff --git a/tests/sample7.py b/tests/sample7.py index 957c379..c6924fa 100644 --- a/tests/sample7.py +++ b/tests/sample7.py @@ -1,30 +1,32 @@ from __future__ import print_function -def one(a=123, b='234'): +def one(a=123, b='234', c={'3': [4, '5']}): for i in range(1): # one - a = b = None + a = b = c['side'] = 'effect' two() -def two(c={'3': [4, 5]}): +def two(a=123, b='234', c={'3': [4, '5']}): for i in range(1): # two - c['side'] = 'effect' + a = b = c['side'] = 'effect' three() -def three(): +def three(a=123, b='234', c={'3': [4, '5']}): for i in range(1): # three + a = b = c['side'] = 'effect' four() -def four(): +def four(a=123, b='234', c={'3': [4, '5']}): for i in range(1): # four + a = b = c['side'] = 'effect' five() -def five(): - in_five = 1 +def five(a=123, b='234', c={'3': [4, '5']}): + a = b = c['side'] = in_five = 'effect' for i in range(1): # five return i # five diff --git a/tests/test_integration.py b/tests/test_integration.py index b6a2eed..98b9a69 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -14,10 +14,10 @@ from hunter import Debugger from hunter import ErrorSnooper from hunter import Q +from hunter import StackPrinter from hunter import VarsPrinter from hunter import VarsSnooper from hunter import When -from hunter import StackPrinter try: from cStringIO import StringIO @@ -227,9 +227,9 @@ def main(): os._exit(0) # child with trace(actions=[Action(force_pid=force_pid, stream=sys.stdout), - VarsPrinter('a', force_pid=force_pid, stream=sys.stdout)], - stdlib=False, - threading_support=True): + VarsPrinter('a', force_pid=force_pid, stream=sys.stdout)], + stdlib=False, + threading_support=True): main() out, err = capfd.readouterr() print('OUT', out) @@ -604,33 +604,49 @@ def test_backlog_before_return(LineMatcher): Backlog(fullsource_has='return i', size=10, stack=6, action=CallPrinter( stream=Namespace( flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))), force_colors=1)), + write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))))), action=CallPrinter(stream=buff) ): from sample7 import one one() one() # make sure Backlog is reusable (doesn't have storage side-effects) - output = buff.getvalue() print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*tegration.py:* call => test_backlog(LineMatcher=*)", - "*sample7.py:6 call => one()", - "*sample7.py:11 call => two()", - "*sample7.py:11 line three()", - "*sample7.py:14 call => three()", - "*sample7.py:15 line for i in range(1): # three", - "*sample7.py:16 line four()", - "*sample7.py:19 call => four()", - "*sample7.py:20 line for i in range(1): # four", - "*sample7.py:21 line five()", - "*sample7.py:24 call => five()", - "*sample7.py:25 line in_five = 1", - "*sample7.py:26 line for i in range(1): # five", - "DONE backlog." - "*sample7.py:27 line return i # five", + "*gration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", + "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7.py:* line four() [[]backlog[]]", + "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7.py:* line five() [[]backlog[]]", + "*sample7.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7.py:* line return i # five", + "*sample7.py:* return <= five: 0", + "*gration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", + "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7.py:* line four() [[]backlog[]]", + "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7.py:* line five() [[]backlog[]]", + "*sample7.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7.py:* line return i # five", + "*sample7.py:* return <= five: 0", ]) @@ -640,7 +656,7 @@ def test_backlog_before_call(LineMatcher): Backlog(function='five', size=5, stack=5, action=CallPrinter( stream=Namespace( flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))), force_colors=1)), + write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))))), action=CallPrinter(stream=buff) ): @@ -648,24 +664,36 @@ def test_backlog_before_call(LineMatcher): one() one() # make sure Backlog is reusable (doesn't have storage side-effects) - output = buff.getvalue() print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*tegration.py:* call => test_backlog(LineMatcher=*)", - "*sample7.py:6 call => one()", - "*sample7.py:11 call => two()", - "*sample7.py:11 line three()", - "*sample7.py:14 call => three()", - "*sample7.py:15 line for i in range(1): # three", - "*sample7.py:16 line four()", - "*sample7.py:19 call => four()", - "*sample7.py:20 line for i in range(1): # four", - "*sample7.py:21 line five()", - "*sample7.py:24 call => five()", - "*sample7.py:25 line in_five = 1", - "*sample7.py:26 line for i in range(1): # five", - "DONE backlog." - "*sample7.py:27 line return i # five", + "*gration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", + "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line four() [[]backlog[]]", + "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7.py:* line five() [[]backlog[]]", + "*sample7.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", + "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7.py:* line for i in range(1): # five", + "*sample7.py:* line return i # five", + "*sample7.py:* return <= five: 0", + "*gration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", + "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line four() [[]backlog[]]", + "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7.py:* line five() [[]backlog[]]", + "*sample7.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", + "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7.py:* line for i in range(1): # five", + "*sample7.py:* line return i # five", + "*sample7.py:* return <= five: 0", ]) From 4e4b601697668eee0ee5a63638ec9cbd0081d858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 28 Mar 2020 04:20:04 +0200 Subject: [PATCH 06/38] Move the augmented sample7 to a new file and fix various test breakage. --- tests/conftest.py | 8 +++ tests/sample7.py | 21 +++--- tests/sample7args.py | 35 ++++++++++ tests/test_integration.py | 138 ++++++++++++++++++++------------------ 4 files changed, 124 insertions(+), 78 deletions(-) create mode 100644 tests/conftest.py create mode 100644 tests/sample7args.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..148177c --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,8 @@ +import pytest + +from hunter.actions import CallPrinter + + +@pytest.fixture(autouse=True) +def cleanup_CallPrinter(): + CallPrinter.cleanup() diff --git a/tests/sample7.py b/tests/sample7.py index c6924fa..66daec1 100644 --- a/tests/sample7.py +++ b/tests/sample7.py @@ -1,34 +1,33 @@ from __future__ import print_function +import os +import sys -def one(a=123, b='234', c={'3': [4, '5']}): + +def one(): for i in range(1): # one - a = b = c['side'] = 'effect' two() -def two(a=123, b='234', c={'3': [4, '5']}): +def two(): for i in range(1): # two - a = b = c['side'] = 'effect' three() -def three(a=123, b='234', c={'3': [4, '5']}): +def three(): for i in range(1): # three - a = b = c['side'] = 'effect' four() -def four(a=123, b='234', c={'3': [4, '5']}): +def four(): for i in range(1): # four - a = b = c['side'] = 'effect' five() -def five(a=123, b='234', c={'3': [4, '5']}): - a = b = c['side'] = in_five = 'effect' +def five(): + in_five = 1 for i in range(1): # five - return i # five + return i if __name__ == "__main__": diff --git a/tests/sample7args.py b/tests/sample7args.py new file mode 100644 index 0000000..c6924fa --- /dev/null +++ b/tests/sample7args.py @@ -0,0 +1,35 @@ +from __future__ import print_function + + +def one(a=123, b='234', c={'3': [4, '5']}): + for i in range(1): # one + a = b = c['side'] = 'effect' + two() + + +def two(a=123, b='234', c={'3': [4, '5']}): + for i in range(1): # two + a = b = c['side'] = 'effect' + three() + + +def three(a=123, b='234', c={'3': [4, '5']}): + for i in range(1): # three + a = b = c['side'] = 'effect' + four() + + +def four(a=123, b='234', c={'3': [4, '5']}): + for i in range(1): # four + a = b = c['side'] = 'effect' + five() + + +def five(a=123, b='234', c={'3': [4, '5']}): + a = b = c['side'] = in_five = 'effect' + for i in range(1): # five + return i # five + + +if __name__ == "__main__": + one() diff --git a/tests/test_integration.py b/tests/test_integration.py index 98b9a69..4e27402 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -9,15 +9,19 @@ import pytest from fields import Namespace -from hunter import CallPrinter, trace, Backlog +from hunter import Backlog, wrap +from hunter import CallPrinter from hunter import CodePrinter from hunter import Debugger from hunter import ErrorSnooper from hunter import Q from hunter import StackPrinter +from hunter import Tracer from hunter import VarsPrinter from hunter import VarsSnooper from hunter import When +from hunter import trace + try: from cStringIO import StringIO @@ -288,7 +292,7 @@ def foo(): def test_depth_limit(LineMatcher, depth): buff = StringIO() from sample7 import one - tracer = hunter.Tracer() + tracer = Tracer() predicate = When(Q(depth_lt=depth), CallPrinter(stream=buff)) try: tracer.trace(predicate) @@ -342,7 +346,7 @@ def test_varssnooper(LineMatcher): lines = StringIO() snooper = VarsSnooper(stream=lines) - @hunter.wrap(actions=[snooper, CodePrinter(stream=lines)]) + @wrap(actions=[snooper, CodePrinter(stream=lines)]) def a(): foo = bar = b = 1 b = 2 @@ -377,7 +381,7 @@ def test_errorsnooper(LineMatcher): lines = StringIO() snooper = ErrorSnooper(stream=lines, max_backlog=50, max_events=100) - @hunter.wrap(actions=[snooper]) + @wrap(actions=[snooper]) def a(): from sample8errors import silenced1, silenced2, silenced3, silenced4, notsilenced @@ -502,7 +506,7 @@ def test_errorsnooper_fastmode(LineMatcher): lines = StringIO() snooper = ErrorSnooper(stream=lines, max_backlog=0, max_events=100) - @hunter.wrap(actions=[snooper]) + @wrap(actions=[snooper]) def a(): from sample8errors import silenced1, silenced2, silenced3, silenced4, notsilenced @@ -607,7 +611,7 @@ def test_backlog_before_return(LineMatcher): write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))))), action=CallPrinter(stream=buff) ): - from sample7 import one + from sample7args import one one() one() # make sure Backlog is reusable (doesn't have storage side-effects) @@ -615,38 +619,38 @@ def test_backlog_before_return(LineMatcher): print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*gration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", - "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7.py:* line four() [[]backlog[]]", - "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7.py:* line five() [[]backlog[]]", - "*sample7.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7.py:* line return i # five", - "*sample7.py:* return <= five: 0", - "*gration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", - "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7.py:* line four() [[]backlog[]]", - "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7.py:* line five() [[]backlog[]]", - "*sample7.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7.py:* line return i # five", - "*sample7.py:* return <= five: 0", + "*integration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*integration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", ]) @@ -660,7 +664,7 @@ def test_backlog_before_call(LineMatcher): action=CallPrinter(stream=buff) ): - from sample7 import one + from sample7args import one one() one() # make sure Backlog is reusable (doesn't have storage side-effects) @@ -668,32 +672,32 @@ def test_backlog_before_call(LineMatcher): print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*gration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", - "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line four() [[]backlog[]]", - "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7.py:* line five() [[]backlog[]]", - "*sample7.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", - "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7.py:* line for i in range(1): # five", - "*sample7.py:* line return i # five", - "*sample7.py:* return <= five: 0", - "*gration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", - "*sample7.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line four() [[]backlog[]]", - "*sample7.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7.py:* line five() [[]backlog[]]", - "*sample7.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", - "*sample7.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7.py:* line for i in range(1): # five", - "*sample7.py:* line return i # five", - "*sample7.py:* return <= five: 0", + "*integration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*integration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", ]) From 98888d0a4745e6d33b52a799f99426d01226077f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 28 Mar 2020 06:08:34 +0200 Subject: [PATCH 07/38] More fixes and cleanup. Move the filter method inside the class. --- src/hunter/__init__.py | 52 +++++++++++---------------- src/hunter/event.py | 4 --- src/hunter/predicates.py | 75 ++++++++++++++++++++++++--------------- tests/test_integration.py | 2 +- tests/test_predicates.py | 66 +++++++++++++++++----------------- tests/test_tracer.py | 15 ++++---- 6 files changed, 109 insertions(+), 105 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 6be984b..71fb14f 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -8,7 +8,7 @@ import warnings import weakref -from .actions import Action, ColorStreamAction +from .actions import Action from .actions import CallPrinter from .actions import CodePrinter from .actions import Debugger @@ -17,6 +17,7 @@ from .actions import StackPrinter from .actions import VarsPrinter from .actions import VarsSnooper + try: if os.environ.get("PUREPYTHONHUNTER"): raise ImportError("Cython speedups are disabled.") @@ -166,6 +167,14 @@ def Q(*predicates, **query): return result +def _merge(*predicates, **query): + if predicates: + predicates += Query(**query), + return And(*predicates) + else: + return Query(**query) + + def _flatten(cls, predicate, *predicates): if not predicates: return predicate @@ -274,33 +283,14 @@ def From(condition=None, predicate=None, watermark=0, **kwargs): return _From(condition, predicate, watermark) -def Backlog(condition=None, filter=None, size=100, stack=0, action=CallPrinter, **kwargs): - condition = _get_condition(condition, kwargs) - if inspect.isclass(action): - action = action() - - if not isinstance(action, ColorStreamAction): - raise TypeError("Action %r must be an instance of ColorStreamAction." % action) - - return _Backlog(condition, filter=filter, size=size, stack=stack, action=action) - - -def _backlog_filter(self, condition=None, **kwargs): - self.filter_condition = _get_condition(condition, kwargs) - return self - - -_Backlog.filter = _backlog_filter - - -def _get_condition(condition, kwargs): - if condition is None: - return Q(**kwargs) - elif kwargs: - raise TypeError("Unexpected arguments {}. Don't combine positional with keyword arguments.".format( - kwargs.keys())) - - return condition +def Backlog(*conditions, **kwargs): + size = kwargs.pop("size", 100) + stack = kwargs.pop("stack", 10) + vars = kwargs.pop("vars", False) + action = kwargs.pop("action", CallPrinter) + if not conditions and not kwargs: + raise TypeError("Backlog needs at least 1 condition.") + return _Backlog(_merge(*conditions, **kwargs), size=size, stack=stack, vars=vars, action=action) def stop(): @@ -310,7 +300,7 @@ def stop(): global _last_tracer if _last_tracer is None: - warnings.warn('There is no tracer to stop.') + warnings.warn("There is no tracer to stop.") else: _last_tracer.stop() _last_tracer = None @@ -415,14 +405,14 @@ def tracing_decorator(func): @functools.wraps(func) def tracing_wrapper(*args, **kwargs): predicates = [] - local = trace_options.pop('local', False) + local = trace_options.pop("local", False) if local: predicates.append(Query(depth_lt=2)) predicates.append( From( Query(kind="call"), Not(When( - Query(calls_gt=0, depth=0) & Not(Query(kind='return')), + Query(calls_gt=0, depth=0) & Not(Query(kind="return")), Stop )), watermark=-1 diff --git a/src/hunter/event.py b/src/hunter/event.py index e37a2b6..f832c2f 100644 --- a/src/hunter/event.py +++ b/src/hunter/event.py @@ -63,8 +63,6 @@ def __init__(self, frame, kind, arg, tracer=None, depth=MISSING, calls=MISSING, #: #: :type: str self.kind = kind - self.is_call = kind == 'call' - self.is_line = kind == 'line' #: A value that depends on ``kind`` self.arg = arg @@ -150,8 +148,6 @@ def __call__(self, event): event.calls = self.calls event.depth = self.depth event.kind = self.kind - event.is_call = self.is_call - event.is_line = self.is_line event.detached = True diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 3fb1563..4e3447e 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -5,7 +5,7 @@ import re from itertools import chain, islice -from .actions import Action +from .actions import Action, ColorStreamAction from .event import Event from .util import StringType, clone_event_and_set_attrs from .util import frame_iterator @@ -376,8 +376,8 @@ def __init__(self, condition, predicate=None, watermark=0): self.condition = condition self.predicate = predicate self.watermark = watermark - self.origin_depth = None - self.origin_calls = None + self._origin_depth = None + self._origin_calls = None def __str__(self): return 'From(%s, %s, watermark=%s)' % ( @@ -403,18 +403,18 @@ def __call__(self, event): """ Handles the event. """ - if self.origin_depth is None: + if self._origin_depth is None: if self.condition(event): - self.origin_depth = event.depth - self.origin_calls = event.calls + self._origin_depth = event.depth + self._origin_calls = event.calls delta_depth = delta_calls = 0 else: return False else: - delta_depth = event.depth - self.origin_depth - delta_calls = event.calls - self.origin_calls + delta_depth = event.depth - self._origin_depth + delta_calls = event.calls - self._origin_calls if delta_depth < self.watermark: - self.origin_depth = None + self._origin_depth = None return False if self.predicate is None: return True @@ -654,15 +654,16 @@ def __rand__(self, other): class Backlog(object): - def __init__(self, condition, filter, action=None, size=100, stack=10, vars=False): - self.action = action - self.called = False + def __init__(self, condition, size=100, stack=10, vars=False, 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 self.queue = collections.deque(maxlen=size) - self.queue_filter = filter self.size = size self.stack = stack self.vars = vars + self._filter = filter def __call__(self, event): """ @@ -674,10 +675,11 @@ def __call__(self, event): self.action.cleanup() first_event = self.queue[0] - first_depth = first_event.depth - first_event.is_call + first_is_call = first_event.kind == 'call' + first_depth = first_event.depth - first_is_call missing_depth = max(0, self.stack + first_depth - event.depth) if missing_depth: - if first_event.is_call: + if first_is_call: first_frame = first_event.frame.f_back else: first_frame = first_event.frame @@ -695,14 +697,14 @@ def __call__(self, event): stack_event.detached = True stack_events.appendleft(stack_event) for stack_event in stack_events: - if self.queue_filter is None: + if self._filter is None: self.action(stack_event) - elif self.queue_filter(stack_event): + elif self._filter(stack_event): self.action(stack_event) for backlog_event in self.queue: - if self.queue_filter is None: + if self._filter is None: self.action(backlog_event) - elif self.queue_filter(backlog_event): + elif self._filter(backlog_event): self.action(backlog_event) self.queue.clear() else: @@ -713,26 +715,28 @@ def __call__(self, event): return result def __str__(self): - return 'Backlog(%s, %s, size=%s, depth=%s)' % ( - self.condition, self.action, self.size, self.stack + 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 ) def __repr__(self): - return '' % ( - self.condition, self.action, self.size, self.stack + return '' % ( + self.condition, self.size, self.stack, self.vars, self.action, self._filter ) def __eq__(self, other): return ( isinstance(other, Backlog) and - self.condition == other.condition and - self.action == other.action and - self.queue == other.queue and - self.stack == other.stack + self.condition == self.condition and + self.size == self.size and + self.stack == self.stack and + self.vars == self.vars and + self.action == self.action + ) def __hash__(self): - return hash(('Backlog', self.condition, self.action, self.queue, self.stack)) + return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) def __or__(self, other): """ @@ -750,7 +754,7 @@ def __invert__(self): """ Convenience API so you can do ``~Backlog(...)``. It converts that to ``Not(Backlog(...))``. """ - return Not(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): """ @@ -763,3 +767,16 @@ def __rand__(self, other): Convenience API so you can do ``other & Backlog(...)``. It converts that to ``And(other, Backlog(...))``. """ return And(other, self) + + def filter(self, *args, **kwargs): + from hunter import _merge + + if self.filter is not None: + args = (self.filter,) + args + + return Backlog( + Not(self.condition), + size=self.size, stack=self.stack, vars=self.vars, action=self.action, + filter=_merge(*args, **kwargs) + ) + diff --git a/tests/test_integration.py b/tests/test_integration.py index 4e27402..96e3315 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -630,7 +630,7 @@ def test_backlog_before_return(LineMatcher): "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => five(a=?, b=?, c=*) [[]backlog[]]", "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", "*sample7args.py:* line return i # five", diff --git a/tests/test_predicates.py b/tests/test_predicates.py index ab4498a..7615e3c 100644 --- a/tests/test_predicates.py +++ b/tests/test_predicates.py @@ -17,6 +17,7 @@ from hunter import Q from hunter import Query from hunter import When +from hunter.actions import ColorStreamAction class FakeCallable(object): @@ -218,44 +219,42 @@ def test_from(mockevent): def test_backlog(mockevent): - pytest.raises(AttributeError, Backlog(), 1) - assert Backlog()(mockevent) is True + assert Backlog(module=__name__)(mockevent) is True - called = [] - assert Backlog(Q(module='foo') | Q(module='bar'), lambda: lambda ev: called.append(ev))(mockevent) is False - assert called == [] + class Action(ColorStreamAction): + called = [] - assert Backlog(Not(Q(module='foo') | Q(module='bar')), lambda: lambda ev: called.append(ev))(mockevent) is True - assert called + def __call__(self, event): + self.called.append(event) - called = [] - assert Backlog(Q(module=__name__), lambda: lambda ev: called.append(ev))(mockevent) is True - assert called + assert Backlog(Q(module='foo') | Q(module='bar'), action=Action)(mockevent) is False + assert Action.called == [] + backlog = Backlog(Not(Q(module='foo') | Q(module='bar')), action=Action) + assert backlog(mockevent) is True + assert backlog(mockevent) is True + assert Action.called == [] -def test_backlog_predicate(): - assert isinstance(Backlog().action, CallPrinter) - assert isinstance(Backlog(action=CallPrinter).action, CallPrinter) + def predicate(ev, store=[]): + store.append(1) + return len(store) > 2 - class FakeAction: - called = False + backlog = Backlog(predicate, action=Action, stack=0) - def __init__(self): - FakeAction.called = True + assert backlog(mockevent) is False + assert backlog(mockevent) is False + assert backlog(mockevent) is True + assert len(Action.called) == 2 - assert not FakeAction.called - assert isinstance(Backlog(action=FakeAction).action, FakeAction) - assert FakeAction.called - class FakeAction: - not_called = True +def test_backlog_action_setup(): + assert isinstance(Backlog(module=1).action, CallPrinter) + assert isinstance(Backlog(module=1, action=CodePrinter).action, CodePrinter) - def __call__(self): - FakeAction.not_called = False + class FakeAction(ColorStreamAction): + pass - assert FakeAction.not_called - assert isinstance(Backlog(action=FakeAction()).action, FakeAction) - assert FakeAction.not_called + assert isinstance(Backlog(module=1, action=FakeAction).action, FakeAction) def test_and_or_kwargs(): @@ -270,10 +269,11 @@ def test_from_typeerror(): def test_backlog_typeerror(): - pytest.raises(TypeError, Backlog, 1, 2, kind=3) - pytest.raises(TypeError, Backlog, 1, function=2) + pytest.raises(TypeError, Backlog) pytest.raises(TypeError, Backlog, junk=1) - pytest.raises(TypeError, Backlog, size=1, depth=1) + pytest.raises(TypeError, Backlog, action=1) + pytest.raises(TypeError, Backlog, module=1, action=1) + pytest.raises(TypeError, Backlog, module=1, action=type) def test_and(mockevent): @@ -328,11 +328,10 @@ def test_str_repr(): ) assert str(From(module='a', depth_gte=2)) == "From(Query(module='a'), Query(depth_gte=2), watermark=0)" - assert repr(Backlog(module='a', action=lambda: 'foo', size=2)).replace(', " - "action='foo', size=2, depth=None>" + "size=2, stack=10, vars=False, action=CodePrinter" ) - assert str(Backlog(module='a', action=lambda: 'foo', depth=2)) == "Backlog(Query(module='a'), foo, size=None, depth=2)" assert repr(Debugger()) == "Debugger(klass=, kwargs={})" assert str(Debugger()) == "Debugger(klass=, kwargs={})" @@ -348,7 +347,6 @@ def test_hashing(): assert (Q(module='a') & Q(function='b')) in {Q(module='a') & Q(function='b')} assert Q(module='a', action=id) in {Q(module='a', action=id)} assert From(module='a', depth_gte=2) in {From(module='a', depth_gte=2)} - assert Backlog(module='a', size=3) in {Backlog(module='a', size=3)} class Foo(object): def __call__(self): diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 7d979c1..9cfc342 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -35,6 +35,9 @@ class EvilFrame(object): f_back = None + f_globals = {} + f_locals = {} + f_lineno = 0 def __init__(self, **kwargs): self.__dict__.update(kwargs) @@ -110,12 +113,12 @@ def __call__(self, *args, **kwargs): assert str(foobar | ~From(module=1, depth=2)) == 'Or(Foobar, Not(From(Query(module=1), Query(depth=2), watermark=0)))' assert str(From(module=1, depth=2) & foobar) == 'And(From(Query(module=1), Query(depth=2), watermark=0), Foobar)' assert str(From(module=1, depth=2) | foobar) == 'Or(From(Query(module=1), Query(depth=2), watermark=0), Foobar)' - assert str(foobar & Backlog(module=1, action=lambda: 'foo', depth=2)) == 'And(Foobar, Backlog(Query(module=1), foo, size=None, depth=2))' - assert str(foobar | Backlog(module=1, action=lambda: 'foo', depth=2)) == 'Or(Foobar, Backlog(Query(module=1), foo, size=None, depth=2))' - assert str(foobar & ~Backlog(module=1, action=lambda: 'foo', depth=2)) == 'And(Foobar, Not(Backlog(Query(module=1), foo, size=None, depth=2)))' - assert str(foobar | ~Backlog(module=1, action=lambda: 'foo', depth=2)) == 'Or(Foobar, Not(Backlog(Query(module=1), foo, size=None, depth=2)))' - assert str(Backlog(module=1, action=lambda: 'foo', depth=2) & foobar) == 'And(Backlog(Query(module=1), foo, size=None, depth=2), Foobar)' - assert str(Backlog(module=1, action=lambda: 'foo', depth=2) | foobar) == 'Or(Backlog(Query(module=1), foo, size=None, depth=2), Foobar)' + assert str(foobar & Backlog(module=1)).startswith('And(Foobar, Backlog(Query(module=1), ') + assert str(foobar | Backlog(module=1)).startswith('Or(Foobar, Backlog(Query(module=1), ') + assert str(foobar & ~Backlog(module=1)).startswith('And(Foobar, Backlog(Not(Query(module=1)), ') + assert str(foobar | ~Backlog(module=1)).startswith('Or(Foobar, Backlog(Not(Query(module=1)), ') + assert str(Backlog(module=1) & foobar).startswith('And(Backlog(Query(module=1), ') + assert str(Backlog(module=1) | foobar).startswith('Or(Backlog(Query(module=1), ') assert str(Q(module=1) & foobar) == 'And(Query(module=1), Foobar)' assert str(Q(module=1) | foobar) == 'Or(Query(module=1), Foobar)' assert str(~Q(module=1) & foobar) == 'And(Not(Query(module=1)), Foobar)' From b6ffdce2db9ba6cda352174c3f16d46fc43b9505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 28 Mar 2020 06:10:49 +0200 Subject: [PATCH 08/38] A bit more cleanup. --- src/hunter/predicates.py | 9 +++++---- src/hunter/util.py | 7 ------- tests/test_integration.py | 4 ++-- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 4e3447e..9b897da 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -3,11 +3,13 @@ import collections import inspect import re -from itertools import chain, islice +from itertools import chain +from itertools import islice -from .actions import Action, ColorStreamAction +from .actions import Action +from .actions import ColorStreamAction from .event import Event -from .util import StringType, clone_event_and_set_attrs +from .util import StringType from .util import frame_iterator __all__ = ( @@ -779,4 +781,3 @@ def filter(self, *args, **kwargs): size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=_merge(*args, **kwargs) ) - diff --git a/src/hunter/util.py b/src/hunter/util.py index ff9aac0..36085bf 100644 --- a/src/hunter/util.py +++ b/src/hunter/util.py @@ -194,10 +194,3 @@ def frame_iterator(frame): while frame: yield frame frame = frame.f_back - - -def clone_event_and_set_attrs(event, **kwargs): - new_event = event.clone() - for key, val in kwargs.items(): - setattr(new_event, key, val) - return new_event diff --git a/tests/test_integration.py b/tests/test_integration.py index 96e3315..f67a66d 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -9,7 +9,7 @@ import pytest from fields import Namespace -from hunter import Backlog, wrap +from hunter import Backlog from hunter import CallPrinter from hunter import CodePrinter from hunter import Debugger @@ -21,7 +21,7 @@ from hunter import VarsSnooper from hunter import When from hunter import trace - +from hunter import wrap try: from cStringIO import StringIO From 4f6b81e5974cba8c0c96f281b9a011b62a5a0cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 28 Mar 2020 19:02:03 +0200 Subject: [PATCH 09/38] Add two more tests and fix various sideffects in the suite. --- tests/conftest.py | 9 ++ tests/test_config.py | 10 +- tests/test_integration.py | 106 +++++++++++++++++- tests/test_tracer.py | 226 +++++++++++++++++++------------------- tox.ini | 1 + 5 files changed, 234 insertions(+), 118 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 148177c..2e31107 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +import sys + import pytest from hunter.actions import CallPrinter @@ -6,3 +8,10 @@ @pytest.fixture(autouse=True) def cleanup_CallPrinter(): CallPrinter.cleanup() + + +@pytest.fixture(autouse=True) +def cleanup_samples(): + for mod in list(sys.modules): + if mod.startswith('sample'): + del sys.modules[mod] diff --git a/tests/test_config.py b/tests/test_config.py index 8997115..5caccb2 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -4,6 +4,14 @@ import hunter +@pytest.fixture +def cleanup(): + hunter._default_trace_args = None + hunter._default_config.clear() + yield + hunter._default_trace_args = None + hunter._default_config.clear() + @pytest.mark.parametrize('config', [ ('foobar', (('x',), {'y': 1}), {}, @@ -29,7 +37,7 @@ ('threads=1', (('x',), {'y': 1, 'threads': 1}), {}, ''), ('thread=1', (('x',), {'y': 1, 'thread': 1}), {}, ''), ('', (('x',), {'y': 1}), {}, ''), -]) +], ids=lambda x: repr(x)) def test_config(monkeypatch, config, capsys): env, result, defaults, stderr = config monkeypatch.setitem(os.environ, 'PYTHONHUNTERCONFIG', env) diff --git a/tests/test_integration.py b/tests/test_integration.py index f67a66d..3f2c0b2 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -608,7 +608,7 @@ def test_backlog_before_return(LineMatcher): Backlog(fullsource_has='return i', size=10, stack=6, action=CallPrinter( stream=Namespace( flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))))), + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), action=CallPrinter(stream=buff) ): from sample7args import one @@ -616,7 +616,6 @@ def test_backlog_before_return(LineMatcher): one() # make sure Backlog is reusable (doesn't have storage side-effects) output = buff.getvalue() - print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ "*integration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", @@ -660,7 +659,7 @@ def test_backlog_before_call(LineMatcher): Backlog(function='five', size=5, stack=5, action=CallPrinter( stream=Namespace( flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [backlog]\n'))))), + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), action=CallPrinter(stream=buff) ): @@ -669,7 +668,6 @@ def test_backlog_before_call(LineMatcher): one() # make sure Backlog is reusable (doesn't have storage side-effects) output = buff.getvalue() - print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ "*integration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", @@ -701,3 +699,103 @@ def test_backlog_before_call(LineMatcher): "*sample7args.py:* line return i # five", "*sample7args.py:* return <= five: 0", ]) + + +def test_backlog_vars_before_return(LineMatcher): + buff = StringIO() + with trace( + Backlog(fullsource_has='return i', vars=True, size=10, stack=6, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), + action=CallPrinter(stream=buff) + ): + from sample7args import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*integration.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*integration.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + ]) + + +def test_backlog_vars_before_call(LineMatcher): + buff = StringIO() + with trace( + Backlog(function='five', vars=True, size=5, stack=5, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), + action=CallPrinter(stream=buff) + ): + from sample7args import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*integration.py:* call => test_backlog_vars_before_call(LineMatcher=*) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*integration.py:* call => test_backlog_vars_before_call(LineMatcher=) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + ]) diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 9cfc342..3221374 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -817,119 +817,119 @@ def test_from_predicate_line_no_predicate(LineMatcher): assert 'one' not in output -def test_backlog_size_call(LineMatcher): - backlog_buff = StringIO() - tracer_buff = StringIO() - from sample7 import one - with trace( - Backlog(function='five', size=5, action=CallPrinter(stream=backlog_buff)), - action=CallPrinter(stream=tracer_buff) - ): - one() - backlog_output = backlog_buff.getvalue() - lm = LineMatcher(backlog_output.splitlines()) - lm.fnmatch_lines([ - "* line for i in range(1): # three", - "* line four()", - "* call => four()", - "* line for i in range(1): # four", - "* line five()", - ]) - assert '=> three' not in backlog_output - assert '=> five()' not in backlog_output - assert 'two' not in backlog_output - assert 'one' not in backlog_output - - tracer_output = tracer_buff.getvalue() - assert len(tracer_output.splitlines()) == 1 - assert " call => five()" in tracer_output - - -def test_backlog_size_line(LineMatcher): - buff = StringIO() - tracer_buff = StringIO() - from sample7 import one - with trace( - Backlog(fullsource_has='return i', size=5, action=CallPrinter(stream=buff)), - action=CallPrinter(stream=tracer_buff) - ): - one() - output = buff.getvalue() - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "* line for i in range(1): # four", - "* line five()", - "* call => five()", - "* line in_five = 1", - "* line for i in range(1): # five", - ]) - - assert 'four' not in output - - tracer_output = tracer_buff.getvalue() - assert len(tracer_output.splitlines()) == 1 - assert " line return i" in tracer_output - - -def test_backlog_size_call_filter(LineMatcher): - buff = StringIO() - tracer_buff = StringIO() - from sample7 import one - with trace( - Backlog(function='five', size=5, action=CallPrinter(stream=buff)).filter(~Q(fullsource_has='four')), - action=CallPrinter(stream=tracer_buff) - ): - one() - output = buff.getvalue() - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "* line for i in range(1): # two", - "* line three()", - "* call => three()", - "* line for i in range(1): # three", - "* line five()", - ]) - assert "four" not in output - - tracer_output = tracer_buff.getvalue() - assert len(tracer_output.splitlines()) == 1 - assert " call => five()" in tracer_buff.getvalue() - - -def test_backlog_size_predicate_line_filter(LineMatcher): - buff = StringIO() - tracer_buff = StringIO() - from sample7 import one - with trace( - Backlog(fullsource_has='return i', size=5, action=CallPrinter(stream=buff)).filter(~Q(fullsource_has="five")), - action=CallPrinter(stream=tracer_buff) - ): - one() - output = buff.getvalue() - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "* call => three()", - "* line for i in range(1): # three", - "* line four()", - "* call => four()", - "* line for i in range(1): # four", - ]) - - assert "five" not in output - - tracer_output = tracer_buff.getvalue() - assert len(tracer_output.splitlines()) == 1 - assert " line return i" in tracer_output - - -def test_backlog_size_first_line_match(LineMatcher): - buff = StringIO() - tracer_buff = StringIO() - from sample7 import one - with trace(Backlog(fullsource_has='one', module_rx='sample7', size=100, action=CallPrinter(stream=buff)).filter(fullsource_has='one'), action=CallPrinter(stream=tracer_buff)): - one() - output = buff.getvalue() - assert not output +# def test_backlog_size_call(LineMatcher): +# backlog_buff = StringIO() +# tracer_buff = StringIO() +# from sample7 import one +# with trace( +# Backlog(function='five', size=5, action=CallPrinter(stream=backlog_buff)), +# action=CallPrinter(stream=tracer_buff) +# ): +# one() +# backlog_output = backlog_buff.getvalue() +# lm = LineMatcher(backlog_output.splitlines()) +# lm.fnmatch_lines([ +# "* line for i in range(1): # three", +# "* line four()", +# "* call => four()", +# "* line for i in range(1): # four", +# "* line five()", +# ]) +# assert '=> three' not in backlog_output +# assert '=> five()' not in backlog_output +# assert 'two' not in backlog_output +# assert 'one' not in backlog_output +# +# tracer_output = tracer_buff.getvalue() +# assert len(tracer_output.splitlines()) == 1 +# assert " call => five()" in tracer_output +# +# +# def test_backlog_size_line(LineMatcher): +# buff = StringIO() +# tracer_buff = StringIO() +# from sample7 import one +# with trace( +# Backlog(fullsource_has='return i', size=5, action=CallPrinter(stream=buff)), +# action=CallPrinter(stream=tracer_buff) +# ): +# one() +# output = buff.getvalue() +# lm = LineMatcher(output.splitlines()) +# lm.fnmatch_lines([ +# "* line for i in range(1): # four", +# "* line five()", +# "* call => five()", +# "* line in_five = 1", +# "* line for i in range(1): # five", +# ]) +# +# assert 'four' not in output +# +# tracer_output = tracer_buff.getvalue() +# assert len(tracer_output.splitlines()) == 1 +# assert " line return i" in tracer_output +# +# +# def test_backlog_size_call_filter(LineMatcher): +# buff = StringIO() +# tracer_buff = StringIO() +# from sample7 import one +# with trace( +# Backlog(function='five', size=5, action=CallPrinter(stream=buff)).filter(~Q(fullsource_has='four')), +# action=CallPrinter(stream=tracer_buff) +# ): +# one() +# output = buff.getvalue() +# lm = LineMatcher(output.splitlines()) +# lm.fnmatch_lines([ +# "* line for i in range(1): # two", +# "* line three()", +# "* call => three()", +# "* line for i in range(1): # three", +# "* line five()", +# ]) +# assert "four" not in output +# +# tracer_output = tracer_buff.getvalue() +# assert len(tracer_output.splitlines()) == 1 +# assert " call => five()" in tracer_buff.getvalue() +# +# +# def test_backlog_size_predicate_line_filter(LineMatcher): +# buff = StringIO() +# tracer_buff = StringIO() +# from sample7 import one +# with trace( +# Backlog(fullsource_has='return i', size=5, action=CallPrinter(stream=buff)).filter(~Q(fullsource_has="five")), +# action=CallPrinter(stream=tracer_buff) +# ): +# one() +# output = buff.getvalue() +# lm = LineMatcher(output.splitlines()) +# lm.fnmatch_lines([ +# "* call => three()", +# "* line for i in range(1): # three", +# "* line four()", +# "* call => four()", +# "* line for i in range(1): # four", +# ]) +# +# assert "five" not in output +# +# tracer_output = tracer_buff.getvalue() +# assert len(tracer_output.splitlines()) == 1 +# assert " line return i" in tracer_output +# +# +# def test_backlog_size_first_line_match(LineMatcher): +# buff = StringIO() +# tracer_buff = StringIO() +# from sample7 import one +# with trace(Backlog(fullsource_has='one', module_rx='sample7', size=100, action=CallPrinter(stream=buff)).filter(fullsource_has='one'), action=CallPrinter(stream=tracer_buff)): +# one() +# output = buff.getvalue() +# assert not output def decorator(func): diff --git a/tox.ini b/tox.ini index b616dfe..f3d20b0 100644 --- a/tox.ini +++ b/tox.ini @@ -43,6 +43,7 @@ deps = pytest pytest-travis-fold pytest-benchmark + pytest-random-order colorama==0.4.3 cover: pytest-cov {cython,cover}: cython==0.29.14 From 44ab0ec53900bec6eabdf64cd30bdfd9ff315004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 28 Mar 2020 19:02:37 +0200 Subject: [PATCH 10/38] Styling. --- tests/test_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_config.py b/tests/test_config.py index 5caccb2..713fd9c 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -4,6 +4,7 @@ import hunter + @pytest.fixture def cleanup(): hunter._default_trace_args = None From 107e61b0a78eac95438cbf8931ff91e87424a879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 28 Mar 2020 19:29:11 +0200 Subject: [PATCH 11/38] A bunch more fixes to the evil tracer to emulate the real thing more closely. --- tests/test_config.py | 2 +- tests/test_tracer.py | 237 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 233 insertions(+), 6 deletions(-) diff --git a/tests/test_config.py b/tests/test_config.py index 713fd9c..8b35965 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -5,7 +5,7 @@ import hunter -@pytest.fixture +@pytest.fixture(autouse=True) def cleanup(): hunter._default_trace_args = None hunter._default_config.clear() diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 3221374..af86241 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -8,6 +8,7 @@ from pprint import pprint import pytest +from fields import Namespace import hunter from hunter import And @@ -44,18 +45,27 @@ def __init__(self, **kwargs): class EvilTracer(object): + is_pure = hunter.Tracer.__module__ == 'hunter.tracer' + def __init__(self, *args, **kwargs): self._calls = [] threading_support = kwargs.pop('threading_support', False) clear_env_var = kwargs.pop('clear_env_var', False) self.handler = hunter._prepare_predicate(*args, **kwargs) - self.is_pure = hunter.Tracer.__module__ == 'hunter.tracer' self._tracer = hunter.trace(self._append, threading_support=threading_support, clear_env_var=clear_env_var) def _append(self, event): detached_event = event.detach(lambda obj: obj) if self.is_pure: - detached_event.frame = EvilFrame(f_lasti=event.frame.f_lasti, f_code=event.code) + detached_event.detached = False + detached_event.frame = EvilFrame( + f_globals=event.frame.f_globals, + f_locals=event.frame.f_locals, + + f_back=event.frame.f_back, + f_lasti=event.frame.f_lasti, + f_code=event.code + ) self._calls.append(detached_event) def __enter__(self): @@ -1374,14 +1384,231 @@ def a(): ]) -def test_stack_printer(LineMatcher): +def test_stack_printer_1(LineMatcher): buff = StringIO() - with trace(Q(function="five", action=StackPrinter(stream=buff))): + with trace(Q(function="five", action=StackPrinter(limit=1, stream=buff))): from sample7 import one one() output = buff.getvalue() lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*sample7.py:30:five <= no frames available (detached=True)", + "*sample7.py:30:five <= no frames available (detached=True)" + if trace.is_pure else + "*sample7.py:??:five <= sample7.py:??:four <= sample7.py:??:three <= sample7.py:??:two <= sample7.py:?:one <= test_tracer.py:????:test_stack_printer*", + ]) + + +def test_stack_printer_2(LineMatcher): + buff = StringIO() + with trace(Q(function="five", action=StackPrinter(limit=2, stream=buff))): + from sample7 import one + one() + + output = buff.getvalue() + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*sample7.py:30:five <= no frames available (detached=True)" + if trace.is_pure else + "*sample7.py:??:five <= tests/sample7.py:??:four <= tests/sample7.py:??:three <= tests/sample7.py:??:two <= tests/sample7.py:?:one <= tests/test_tracer.py:????:test_stack_printer*", + ]) + + +def test_backlog_before_return(LineMatcher): + buff = StringIO() + with trace( + Backlog(fullsource_has='return i', size=10, stack=6, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), + action=CallPrinter(stream=buff) + ): + from sample7args import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*test_tracer.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=?, b=?, c=*) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*test_tracer.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + ]) + + +def test_backlog_before_call(LineMatcher): + buff = StringIO() + with trace( + Backlog(function='five', size=5, stack=5, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), + action=CallPrinter(stream=buff) + + ): + from sample7args import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + output = buff.getvalue() + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*test_tracer.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]*})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*test_tracer.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", + "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + ]) + + +def test_backlog_vars_before_return(LineMatcher): + buff = StringIO() + with trace( + Backlog(fullsource_has='return i', vars=True, size=10, stack=6, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), + action=CallPrinter(stream=buff) + ): + from sample7args import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*test_tracer.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]*}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]*}) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*test_tracer.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + ]) + + +def test_backlog_vars_before_call(LineMatcher): + buff = StringIO() + with trace( + Backlog(function='five', vars=True, size=5, stack=5, action=CallPrinter( + stream=Namespace( + flush=buff.flush, + write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), + action=CallPrinter(stream=buff) + ): + from sample7args import one + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + + output = buff.getvalue() + print(output) + lm = LineMatcher(output.splitlines()) + lm.fnmatch_lines([ + "*test_tracer.py:* call => test_backlog_vars_before_call(LineMatcher=*) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]*}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]*})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", + "*test_tracer.py:* call => test_backlog_vars_before_call(LineMatcher=) [[]backlog[]]", + "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line four() [[]backlog[]]", + "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", + "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "*sample7args.py:* line five() [[]backlog[]]", + "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", + "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", + "*sample7args.py:* line for i in range(1): # five", + "*sample7args.py:* line return i # five", + "*sample7args.py:* return <= five: 0", ]) From 34734deed03e28423e239dad140ddcb148218ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 29 Mar 2020 07:40:30 +0300 Subject: [PATCH 12/38] A big load of Backlog fixes. --- setup.cfg | 2 +- src/hunter/__init__.py | 6 +- src/hunter/predicates.py | 24 ++- tests/sample7args.py | 17 ++- tests/test_integration.py | 298 +++++++++++++++----------------------- tests/test_predicates.py | 2 +- tests/test_tracer.py | 234 ++++++------------------------ tests/utils.py | 15 ++ 8 files changed, 209 insertions(+), 389 deletions(-) create mode 100644 tests/utils.py diff --git a/setup.cfg b/setup.cfg index b71b600..edcbb81 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,7 +15,7 @@ force_single_line = True line_length = 120 known_first_party = hunter default_section = THIRDPARTY -forced_separate = test_hunter +forced_separate = utils not_skip = __init__.py skip = migrations known_standard_library = opcode diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 71fb14f..de360a0 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -284,13 +284,15 @@ def From(condition=None, predicate=None, watermark=0, **kwargs): def Backlog(*conditions, **kwargs): + action = kwargs.pop("action", CallPrinter) + filter = kwargs.pop("filter", None) size = kwargs.pop("size", 100) stack = kwargs.pop("stack", 10) + strip = kwargs.pop("strip", True) vars = kwargs.pop("vars", False) - action = kwargs.pop("action", CallPrinter) if not conditions and not kwargs: raise TypeError("Backlog needs at least 1 condition.") - return _Backlog(_merge(*conditions, **kwargs), size=size, stack=stack, vars=vars, action=action) + return _Backlog(_merge(*conditions, **kwargs), size=size, stack=stack, vars=vars, strip=strip, action=action, filter=filter) def stop(): diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 9b897da..bd606b3 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -656,7 +656,7 @@ def __rand__(self, other): class Backlog(object): - def __init__(self, condition, size=100, stack=10, vars=False, action=None, filter=None): + 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) @@ -664,6 +664,7 @@ def __init__(self, condition, size=100, stack=10, vars=False, action=None, filte self.queue = collections.deque(maxlen=size) self.size = size self.stack = stack + self.strip = strip self.vars = vars self._filter = filter @@ -678,8 +679,9 @@ def __call__(self, event): first_event = self.queue[0] first_is_call = first_event.kind == 'call' - first_depth = first_event.depth - first_is_call - missing_depth = max(0, self.stack + first_depth - event.depth) + 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: first_frame = first_event.frame.f_back @@ -691,11 +693,12 @@ def __call__(self, event): stack_event = Event( frame=frame, kind='call', arg=None, threading_support=event.threading_support, - depth=first_depth - depth_delta, calls=-1 + depth=first_depth - depth_delta - 1, calls=-1 ) if not self.vars: # noinspection PyPropertyAccess stack_event.locals = {} + stack_event.globals = {} stack_event.detached = True stack_events.appendleft(stack_event) for stack_event in stack_events: @@ -710,9 +713,14 @@ def __call__(self, event): self.action(backlog_event) self.queue.clear() else: - detached_event = event.detach(self.action.try_repr if self.vars else None) - detached_event.frame = event.frame - self.queue.append(detached_event) + 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. + 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 + self.queue.append(detached_event) return result @@ -777,7 +785,7 @@ def filter(self, *args, **kwargs): args = (self.filter,) + args return Backlog( - Not(self.condition), + self.condition, size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=_merge(*args, **kwargs) ) diff --git a/tests/sample7args.py b/tests/sample7args.py index c6924fa..611eeba 100644 --- a/tests/sample7args.py +++ b/tests/sample7args.py @@ -26,10 +26,25 @@ def four(a=123, b='234', c={'3': [4, '5']}): def five(a=123, b='234', c={'3': [4, '5']}): + six() + six() + six() a = b = c['side'] = in_five = 'effect' for i in range(1): # five return i # five +def six(): + pass + + if __name__ == "__main__": - one() + from utils import DebugCallPrinter + from hunter import * + + with trace( + Backlog(stack=15, vars=True, action=DebugCallPrinter(' [' 'backlog' ']'), function='five').filter(~Q(function='six')), + action=DebugCallPrinter + ): + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) diff --git a/tests/test_integration.py b/tests/test_integration.py index 3f2c0b2..f9e76b5 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -7,7 +7,6 @@ from pprint import pprint import pytest -from fields import Namespace from hunter import Backlog from hunter import CallPrinter @@ -23,6 +22,8 @@ from hunter import trace from hunter import wrap +from utils import DebugCallPrinter + try: from cStringIO import StringIO except ImportError: @@ -602,200 +603,131 @@ def test_stack_printer_2(LineMatcher): ]) -def test_backlog_before_return(LineMatcher): - buff = StringIO() - with trace( - Backlog(fullsource_has='return i', size=10, stack=6, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - ): - from sample7args import one - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) - - output = buff.getvalue() - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "*integration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=?, b=?, c=*) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*integration.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - ]) - - -def test_backlog_before_call(LineMatcher): +@pytest.mark.parametrize('stack', [5, 6], ids="stack={}".format) +def test_backlog(LineMatcher, stack): buff = StringIO() + from sample7args import one with trace( - Backlog(function='five', size=5, stack=5, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - + Backlog( + fullsource_has='return i', size=19, stack=stack, vars=False, action=DebugCallPrinter(' [' 'backlog' ']', stream=buff) + ).filter( + ~Q(function='six') + ), + action=DebugCallPrinter(stream=buff) ): - from sample7args import one one() one() # make sure Backlog is reusable (doesn't have storage side-effects) - output = buff.getvalue() + import re + print(re.sub(r'([\[\]])', r'[\1]', output)) + # print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*integration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*integration.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - ]) - - -def test_backlog_vars_before_return(LineMatcher): - buff = StringIO() - with trace( - Backlog(fullsource_has='return i', vars=True, size=10, stack=6, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - ): - from sample7args import one - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) + "depth=0 calls=-1 *sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "depth=1 calls=?? *sample7args.py:* line two() [[]backlog[]]", + "depth=1 calls=?? *sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* line for i in range(1): # two [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* line three() [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* line four() [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* line five() [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line six() [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line six() [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line six() [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line return i # five", + "depth=4 calls=?? *sample7args.py:* return <= five: 0", + "depth=0 calls=-1 *sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", + "depth=1 calls=?? *sample7args.py:* line two() [[]backlog[]]", + "depth=1 calls=?? *sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* line for i in range(1): # two [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* line three() [[]backlog[]]", + "depth=2 calls=?? *sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* line for i in range(1): # three [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* line four() [[]backlog[]]", + "depth=3 calls=?? *sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* line for i in range(1): # four [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* line five() [[]backlog[]]", + "depth=4 calls=?? *sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line six() [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line six() [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line six() [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line for i in range(1): # five [[]backlog[]]", + "depth=5 calls=?? *sample7args.py:* line return i # five", + "depth=4 calls=?? *sample7args.py:* return <= five: 0", - output = buff.getvalue() - print(output) - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "*integration.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*integration.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", ]) -def test_backlog_vars_before_call(LineMatcher): - buff = StringIO() - with trace( - Backlog(function='five', vars=True, size=5, stack=5, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - ): - from sample7args import one - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) - - output = buff.getvalue() - print(output) +def test_backlog_subprocess(LineMatcher): + output = subprocess.check_output( + ['python', os.path.join(os.path.dirname(__file__), 'sample7args.py')], + stderr=subprocess.STDOUT, + universal_newlines=True, + ) + import re + print(re.sub(r'([\[\]])', r'[\1]', output)) + # print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*integration.py:* call => test_backlog_vars_before_call(LineMatcher=*) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*integration.py:* call => test_backlog_vars_before_call(LineMatcher=) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", + "depth=0 calls=1 *sample7args.py:4 call => one(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=1 calls=2 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", + "depth=1 calls=2 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=1 calls=2 *sample7args.py:7 line two() [[]backlog[]]", + "depth=1 calls=2 *sample7args.py:10 call => two(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=2 calls=3 *sample7args.py:11 line for i in range(1): # two [[]backlog[]]", + "depth=2 calls=3 *sample7args.py:12 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=2 calls=3 *sample7args.py:13 line three() [[]backlog[]]", + "depth=2 calls=3 *sample7args.py:16 call => three(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=3 calls=4 *sample7args.py:17 line for i in range(1): # three [[]backlog[]]", + "depth=3 calls=4 *sample7args.py:18 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=3 calls=4 *sample7args.py:19 line four() [[]backlog[]]", + "depth=3 calls=4 *sample7args.py:22 call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=4 calls=5 *sample7args.py:23 line for i in range(1): # four [[]backlog[]]", + "depth=4 calls=5 *sample7args.py:24 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=4 calls=5 *sample7args.py:25 line five() [[]backlog[]]", + "depth=4 calls=5 *sample7args.py:28 call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", + "depth=5 calls=6 *sample7args.py:29 line six()", + "depth=5 calls=7 *sample7args.py:30 line six()", + "depth=5 calls=8 *sample7args.py:31 line six()", + "depth=5 calls=9 *sample7args.py:32 line a = b = c[[]'side'[]] = in_five = 'effect'", + "depth=5 calls=9 *sample7args.py:33 line for i in range(1): # five", + "depth=5 calls=9 *sample7args.py:34 line return i # five", + "depth=4 calls=9 *sample7args.py:34 return <= five: 0", + "depth=0 calls=9 *sample7args.py:4 call => one(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=1 calls=10 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", + "depth=1 calls=10 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=1 calls=10 *sample7args.py:7 line two() [[]backlog[]]", + "depth=1 calls=10 *sample7args.py:10 call => two(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=2 calls=11 *sample7args.py:11 line for i in range(1): # two [[]backlog[]]", + "depth=2 calls=11 *sample7args.py:12 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=2 calls=11 *sample7args.py:13 line three() [[]backlog[]]", + "depth=2 calls=11 *sample7args.py:16 call => three(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=3 calls=12 *sample7args.py:17 line for i in range(1): # three [[]backlog[]]", + "depth=3 calls=12 *sample7args.py:18 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=3 calls=12 *sample7args.py:19 line four() [[]backlog[]]", + "depth=3 calls=12 *sample7args.py:22 call => four(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=4 calls=13 *sample7args.py:23 line for i in range(1): # four [[]backlog[]]", + "depth=4 calls=13 *sample7args.py:24 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=4 calls=13 *sample7args.py:25 line five() [[]backlog[]]", + "depth=4 calls=13 *sample7args.py:28 call => five(a=123, b='234', c={*'side': 'effect'*})", + "depth=5 calls=14 *sample7args.py:29 line six()", + "depth=5 calls=15 *sample7args.py:30 line six()", + "depth=5 calls=16 *sample7args.py:31 line six()", + "depth=5 calls=17 *sample7args.py:32 line a = b = c[[]'side'[]] = in_five = 'effect'", + "depth=5 calls=17 *sample7args.py:33 line for i in range(1): # five", + "depth=5 calls=17 *sample7args.py:34 line return i # five", + "depth=4 calls=17 *sample7args.py:34 return <= five: 0", ]) diff --git a/tests/test_predicates.py b/tests/test_predicates.py index 7615e3c..0111186 100644 --- a/tests/test_predicates.py +++ b/tests/test_predicates.py @@ -244,7 +244,7 @@ def predicate(ev, store=[]): assert backlog(mockevent) is False assert backlog(mockevent) is False assert backlog(mockevent) is True - assert len(Action.called) == 2 + assert len(Action.called) == 1 def test_backlog_action_setup(): diff --git a/tests/test_tracer.py b/tests/test_tracer.py index af86241..b5d76f1 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -8,7 +8,6 @@ from pprint import pprint import pytest -from fields import Namespace import hunter from hunter import And @@ -24,6 +23,13 @@ from hunter import When from hunter.actions import StackPrinter +from utils import DebugCallPrinter + +try: + from urllib import urlencode +except ImportError: + from urllib.parse import urlencode + try: from cStringIO import StringIO except ImportError: @@ -1393,9 +1399,9 @@ def test_stack_printer_1(LineMatcher): output = buff.getvalue() lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*sample7.py:30:five <= no frames available (detached=True)" + "*sample7.py:??:five <= sample7.py:??:four <= sample7.py:??:three <= sample7.py:??:two <= sample7.py:?:one <= test_tracer.py:????:test_stack_printer*" if trace.is_pure else - "*sample7.py:??:five <= sample7.py:??:four <= sample7.py:??:three <= sample7.py:??:two <= sample7.py:?:one <= test_tracer.py:????:test_stack_printer*", + "*sample7.py:30:five <= no frames available (detached=True)" ]) @@ -1408,207 +1414,49 @@ def test_stack_printer_2(LineMatcher): output = buff.getvalue() lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*sample7.py:30:five <= no frames available (detached=True)" + "*sample7.py:??:five <= tests/sample7.py:??:four <= tests/sample7.py:??:three <= tests/sample7.py:??:two <= tests/sample7.py:?:one <= tests/test_tracer.py:????:test_stack_printer*" if trace.is_pure else - "*sample7.py:??:five <= tests/sample7.py:??:four <= tests/sample7.py:??:three <= tests/sample7.py:??:two <= tests/sample7.py:?:one <= tests/test_tracer.py:????:test_stack_printer*", - ]) - - -def test_backlog_before_return(LineMatcher): - buff = StringIO() - with trace( - Backlog(fullsource_has='return i', size=10, stack=6, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - ): - from sample7args import one - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) - - output = buff.getvalue() - print(output) - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "*test_tracer.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=?, b=?, c=*) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*test_tracer.py:* call => test_backlog_before_return(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - ]) - - -def test_backlog_before_call(LineMatcher): - buff = StringIO() - with trace( - Backlog(function='five', size=5, stack=5, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - - ): - from sample7args import one - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) - - output = buff.getvalue() - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "*test_tracer.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]*})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*test_tracer.py:* call => test_backlog_before_call(LineMatcher=?) [[]backlog[]]", - "*sample7args.py:* call => one(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => two(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* call => three(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=?, b=?, c=?) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - ]) - - -def test_backlog_vars_before_return(LineMatcher): - buff = StringIO() - with trace( - Backlog(fullsource_has='return i', vars=True, size=10, stack=6, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) - ): - from sample7args import one - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) - - output = buff.getvalue() - print(output) - lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ - "*test_tracer.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]*}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]*}) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*test_tracer.py:* call => test_backlog_vars_before_return(LineMatcher=*) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # three [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect' [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # five [[]backlog[]]", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", + "*sample7.py:30:five <= no frames available (detached=True)" ]) -def test_backlog_vars_before_call(LineMatcher): +@pytest.mark.parametrize('stack', [5, 6, 7], ids="stack={}".format) +@pytest.mark.parametrize('size', [6, 8, 10, 12, 14, 16] + list(range(17, 35)), ids="size={}".format) +@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): buff = StringIO() + from sample7args import one with trace( - Backlog(function='five', vars=True, size=5, stack=5, action=CallPrinter( - stream=Namespace( - flush=buff.flush, - write=lambda s: buff.write(s.replace('\n', ' [' 'backlog' ']\n'))))), - action=CallPrinter(stream=buff) + Backlog(size=size, stack=stack, vars=vars, action=DebugCallPrinter(' [' 'backlog' ']', stream=buff), filter=filter, **condition), + action=DebugCallPrinter(stream=buff) ): - from sample7args import one one() one() # make sure Backlog is reusable (doesn't have storage side-effects) output = buff.getvalue() - print(output) + # print(re.sub(r'([\[\]])', r'[\1]', output)) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "*test_tracer.py:* call => test_backlog_vars_before_call(LineMatcher=*) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]]*}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]]*})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", - "*test_tracer.py:* call => test_backlog_vars_before_call(LineMatcher=) [[]backlog[]]", - "*sample7args.py:* call => one(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => two(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* call => three(a='effect', b='effect', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line four() [[]backlog[]]", - "*sample7args.py:* call => four(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'}) [[]backlog[]]", - "*sample7args.py:* line for i in range(1): # four [[]backlog[]]", - "*sample7args.py:* line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "*sample7args.py:* line five() [[]backlog[]]", - "*sample7args.py:* call => five(a=123, b='234', c={'3': [[]4, '5'[]], 'side': 'effect'})", - "*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'", - "*sample7args.py:* line for i in range(1): # five", - "*sample7args.py:* line return i # five", - "*sample7args.py:* return <= five: 0", + "depth=0 calls=*sample7args.py:* call => one(a=*, b=*, c=*) [[]backlog[]]", + "depth=1 calls=*sample7args.py:* call => two(a=*, b=*, c=*) [[]backlog[]]", + "depth=2 calls=*sample7args.py:* call => three(a=*, b=*, c=*) [[]backlog[]]", + "depth=3 calls=*sample7args.py:* call => four(a=*, b=*, c=*) [[]backlog[]]", + "depth=4 calls=*sample7args.py:* call => five(a=*, b=*, c=*)*", + "depth=5 calls=*sample7args.py:* line six()*", + "depth=5 calls=*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'*", + "depth=5 calls=*sample7args.py:* line for i in range(1): # five*", + "depth=5 calls=*sample7args.py:* line return i # five", + "depth=4 calls=*sample7args.py:* return <= five: 0", + "depth=0 calls=*sample7args.py:* call => one(a=*, b=*, c=*) [[]backlog[]]", + "depth=1 calls=*sample7args.py:* call => two(a=*, b=*, c=*) [[]backlog[]]", + "depth=2 calls=*sample7args.py:* call => three(a=*, b=*, c=*) [[]backlog[]]", + "depth=3 calls=*sample7args.py:* call => four(a=*, b=*, c=*) [[]backlog[]]", + "depth=4 calls=*sample7args.py:* call => five(a=*, b=*, c=*)*", + "depth=5 calls=*sample7args.py:* line six()*", + "depth=5 calls=*sample7args.py:* line a = b = c[[]'side'[]] = in_five = 'effect'*", + "depth=5 calls=*sample7args.py:* line for i in range(1): # five*", + "depth=5 calls=*sample7args.py:* line return i # five", + "depth=4 calls=*sample7args.py:* return <= five: 0", ]) diff --git a/tests/utils.py b/tests/utils.py new file mode 100644 index 0000000..67fbfbe --- /dev/null +++ b/tests/utils.py @@ -0,0 +1,15 @@ +from hunter import CallPrinter + + +class DebugCallPrinter(CallPrinter): + def __init__(self, suffix='', **kwargs): + self.suffix = suffix + super(DebugCallPrinter, self).__init__(**kwargs) + + def __call__(self, event): + self.output("depth={} calls={:<4}", event.depth, event.calls) + super(DebugCallPrinter, self).__call__(event) + + def output(self, format_str, *args, **kwargs): + format_str = format_str.replace('\n', '%s\n' % self.suffix) + super(DebugCallPrinter, self).output(format_str, *args, **kwargs) From 3bf7b3f4f98fd406ce2462ab2374734f2365322b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 29 Mar 2020 07:41:42 +0300 Subject: [PATCH 13/38] Vendor colorama cause I can't be bothered to figure out virtualenv issues. Not anymore... --- setup.cfg | 4 +- src/hunter/actions.py | 3 +- src/hunter/util.py | 6 +- src/hunter/vendor/__init__.py | 0 src/hunter/vendor/colorama/__init__.py | 6 + src/hunter/vendor/colorama/ansi.py | 102 +++++++++ src/hunter/vendor/colorama/ansitowin32.py | 258 ++++++++++++++++++++++ src/hunter/vendor/colorama/initialise.py | 80 +++++++ src/hunter/vendor/colorama/win32.py | 152 +++++++++++++ src/hunter/vendor/colorama/winterm.py | 169 ++++++++++++++ 10 files changed, 773 insertions(+), 7 deletions(-) create mode 100644 src/hunter/vendor/__init__.py create mode 100644 src/hunter/vendor/colorama/__init__.py create mode 100644 src/hunter/vendor/colorama/ansi.py create mode 100644 src/hunter/vendor/colorama/ansitowin32.py create mode 100644 src/hunter/vendor/colorama/initialise.py create mode 100644 src/hunter/vendor/colorama/win32.py create mode 100644 src/hunter/vendor/colorama/winterm.py diff --git a/setup.cfg b/setup.cfg index edcbb81..e9b5948 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [flake8] max-line-length = 140 -exclude = tests +exclude = tests,src/hunter/vendor [tool:pytest] testpaths = @@ -17,5 +17,5 @@ known_first_party = hunter default_section = THIRDPARTY forced_separate = utils not_skip = __init__.py -skip = migrations +skip = src/hunter/vendor known_standard_library = opcode diff --git a/src/hunter/actions.py b/src/hunter/actions.py index de76aa6..52a7fd8 100644 --- a/src/hunter/actions.py +++ b/src/hunter/actions.py @@ -8,8 +8,6 @@ from itertools import islice from os import getpid -from colorama import AnsiToWin32 - from . import config from .util import BUILTIN_SYMBOLS from .util import CALL_COLORS @@ -22,6 +20,7 @@ from .util import frame_iterator from .util import iter_symbols from .util import safe_repr +from .vendor.colorama import AnsiToWin32 try: from threading import get_ident diff --git a/src/hunter/util.py b/src/hunter/util.py index 36085bf..33edcb7 100644 --- a/src/hunter/util.py +++ b/src/hunter/util.py @@ -8,9 +8,9 @@ from collections import defaultdict from collections import deque -from colorama import Back -from colorama import Fore -from colorama import Style +from .vendor.colorama import Back +from .vendor.colorama import Fore +from .vendor.colorama import Style try: import __builtin__ as builtins diff --git a/src/hunter/vendor/__init__.py b/src/hunter/vendor/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/hunter/vendor/colorama/__init__.py b/src/hunter/vendor/colorama/__init__.py new file mode 100644 index 0000000..b149ed7 --- /dev/null +++ b/src/hunter/vendor/colorama/__init__.py @@ -0,0 +1,6 @@ +# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. +from .initialise import init, deinit, reinit, colorama_text +from .ansi import Fore, Back, Style, Cursor +from .ansitowin32 import AnsiToWin32 + +__version__ = '0.4.4' diff --git a/src/hunter/vendor/colorama/ansi.py b/src/hunter/vendor/colorama/ansi.py new file mode 100644 index 0000000..11ec695 --- /dev/null +++ b/src/hunter/vendor/colorama/ansi.py @@ -0,0 +1,102 @@ +# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. +''' +This module generates ANSI character codes to printing colors to terminals. +See: http://en.wikipedia.org/wiki/ANSI_escape_code +''' + +CSI = '\033[' +OSC = '\033]' +BEL = '\a' + + +def code_to_chars(code): + return CSI + str(code) + 'm' + +def set_title(title): + return OSC + '2;' + title + BEL + +def clear_screen(mode=2): + return CSI + str(mode) + 'J' + +def clear_line(mode=2): + return CSI + str(mode) + 'K' + + +class AnsiCodes(object): + def __init__(self): + # the subclasses declare class attributes which are numbers. + # Upon instantiation we define instance attributes, which are the same + # as the class attributes but wrapped with the ANSI escape sequence + for name in dir(self): + if not name.startswith('_'): + value = getattr(self, name) + setattr(self, name, code_to_chars(value)) + + +class AnsiCursor(object): + def UP(self, n=1): + return CSI + str(n) + 'A' + def DOWN(self, n=1): + return CSI + str(n) + 'B' + def FORWARD(self, n=1): + return CSI + str(n) + 'C' + def BACK(self, n=1): + return CSI + str(n) + 'D' + def POS(self, x=1, y=1): + return CSI + str(y) + ';' + str(x) + 'H' + + +class AnsiFore(AnsiCodes): + BLACK = 30 + RED = 31 + GREEN = 32 + YELLOW = 33 + BLUE = 34 + MAGENTA = 35 + CYAN = 36 + WHITE = 37 + RESET = 39 + + # These are fairly well supported, but not part of the standard. + LIGHTBLACK_EX = 90 + LIGHTRED_EX = 91 + LIGHTGREEN_EX = 92 + LIGHTYELLOW_EX = 93 + LIGHTBLUE_EX = 94 + LIGHTMAGENTA_EX = 95 + LIGHTCYAN_EX = 96 + LIGHTWHITE_EX = 97 + + +class AnsiBack(AnsiCodes): + BLACK = 40 + RED = 41 + GREEN = 42 + YELLOW = 43 + BLUE = 44 + MAGENTA = 45 + CYAN = 46 + WHITE = 47 + RESET = 49 + + # These are fairly well supported, but not part of the standard. + LIGHTBLACK_EX = 100 + LIGHTRED_EX = 101 + LIGHTGREEN_EX = 102 + LIGHTYELLOW_EX = 103 + LIGHTBLUE_EX = 104 + LIGHTMAGENTA_EX = 105 + LIGHTCYAN_EX = 106 + LIGHTWHITE_EX = 107 + + +class AnsiStyle(AnsiCodes): + BRIGHT = 1 + DIM = 2 + NORMAL = 22 + RESET_ALL = 0 + +Fore = AnsiFore() +Back = AnsiBack() +Style = AnsiStyle() +Cursor = AnsiCursor() diff --git a/src/hunter/vendor/colorama/ansitowin32.py b/src/hunter/vendor/colorama/ansitowin32.py new file mode 100644 index 0000000..6039a05 --- /dev/null +++ b/src/hunter/vendor/colorama/ansitowin32.py @@ -0,0 +1,258 @@ +# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. +import re +import sys +import os + +from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style, BEL +from .winterm import WinTerm, WinColor, WinStyle +from .win32 import windll, winapi_test + + +winterm = None +if windll is not None: + winterm = WinTerm() + + +class StreamWrapper(object): + ''' + Wraps a stream (such as stdout), acting as a transparent proxy for all + attribute access apart from method 'write()', which is delegated to our + Converter instance. + ''' + def __init__(self, wrapped, converter): + # double-underscore everything to prevent clashes with names of + # attributes on the wrapped stream object. + self.__wrapped = wrapped + self.__convertor = converter + + def __getattr__(self, name): + return getattr(self.__wrapped, name) + + def __enter__(self, *args, **kwargs): + # special method lookup bypasses __getattr__/__getattribute__, see + # https://stackoverflow.com/questions/12632894/why-doesnt-getattr-work-with-exit + # thus, contextlib magic methods are not proxied via __getattr__ + return self.__wrapped.__enter__(*args, **kwargs) + + def __exit__(self, *args, **kwargs): + return self.__wrapped.__exit__(*args, **kwargs) + + def write(self, text): + self.__convertor.write(text) + + def isatty(self): + stream = self.__wrapped + if 'PYCHARM_HOSTED' in os.environ: + if stream is not None and (stream is sys.__stdout__ or stream is sys.__stderr__): + return True + try: + stream_isatty = stream.isatty + except AttributeError: + return False + else: + return stream_isatty() + + @property + def closed(self): + stream = self.__wrapped + try: + return stream.closed + except AttributeError: + return True + + +class AnsiToWin32(object): + ''' + Implements a 'write()' method which, on Windows, will strip ANSI character + sequences from the text, and if outputting to a tty, will convert them into + win32 function calls. + ''' + ANSI_CSI_RE = re.compile('\001?\033\\[((?:\\d|;)*)([a-zA-Z])\002?') # Control Sequence Introducer + ANSI_OSC_RE = re.compile('\001?\033\\]([^\a]*)(\a)\002?') # Operating System Command + + def __init__(self, wrapped, convert=None, strip=None, autoreset=False): + # The wrapped stream (normally sys.stdout or sys.stderr) + self.wrapped = wrapped + + # should we reset colors to defaults after every .write() + self.autoreset = autoreset + + # create the proxy wrapping our output stream + self.stream = StreamWrapper(wrapped, self) + + on_windows = os.name == 'nt' + # We test if the WinAPI works, because even if we are on Windows + # we may be using a terminal that doesn't support the WinAPI + # (e.g. Cygwin Terminal). In this case it's up to the terminal + # to support the ANSI codes. + conversion_supported = on_windows and winapi_test() + + # should we strip ANSI sequences from our output? + if strip is None: + strip = conversion_supported or (not self.stream.closed and not self.stream.isatty()) + self.strip = strip + + # should we should convert ANSI sequences into win32 calls? + if convert is None: + convert = conversion_supported and not self.stream.closed and self.stream.isatty() + self.convert = convert + + # dict of ansi codes to win32 functions and parameters + self.win32_calls = self.get_win32_calls() + + # are we wrapping stderr? + self.on_stderr = self.wrapped is sys.stderr + + def should_wrap(self): + ''' + True if this class is actually needed. If false, then the output + stream will not be affected, nor will win32 calls be issued, so + wrapping stdout is not actually required. This will generally be + False on non-Windows platforms, unless optional functionality like + autoreset has been requested using kwargs to init() + ''' + return self.convert or self.strip or self.autoreset + + def get_win32_calls(self): + if self.convert and winterm: + return { + AnsiStyle.RESET_ALL: (winterm.reset_all, ), + AnsiStyle.BRIGHT: (winterm.style, WinStyle.BRIGHT), + AnsiStyle.DIM: (winterm.style, WinStyle.NORMAL), + AnsiStyle.NORMAL: (winterm.style, WinStyle.NORMAL), + AnsiFore.BLACK: (winterm.fore, WinColor.BLACK), + AnsiFore.RED: (winterm.fore, WinColor.RED), + AnsiFore.GREEN: (winterm.fore, WinColor.GREEN), + AnsiFore.YELLOW: (winterm.fore, WinColor.YELLOW), + AnsiFore.BLUE: (winterm.fore, WinColor.BLUE), + AnsiFore.MAGENTA: (winterm.fore, WinColor.MAGENTA), + AnsiFore.CYAN: (winterm.fore, WinColor.CYAN), + AnsiFore.WHITE: (winterm.fore, WinColor.GREY), + AnsiFore.RESET: (winterm.fore, ), + AnsiFore.LIGHTBLACK_EX: (winterm.fore, WinColor.BLACK, True), + AnsiFore.LIGHTRED_EX: (winterm.fore, WinColor.RED, True), + AnsiFore.LIGHTGREEN_EX: (winterm.fore, WinColor.GREEN, True), + AnsiFore.LIGHTYELLOW_EX: (winterm.fore, WinColor.YELLOW, True), + AnsiFore.LIGHTBLUE_EX: (winterm.fore, WinColor.BLUE, True), + AnsiFore.LIGHTMAGENTA_EX: (winterm.fore, WinColor.MAGENTA, True), + AnsiFore.LIGHTCYAN_EX: (winterm.fore, WinColor.CYAN, True), + AnsiFore.LIGHTWHITE_EX: (winterm.fore, WinColor.GREY, True), + AnsiBack.BLACK: (winterm.back, WinColor.BLACK), + AnsiBack.RED: (winterm.back, WinColor.RED), + AnsiBack.GREEN: (winterm.back, WinColor.GREEN), + AnsiBack.YELLOW: (winterm.back, WinColor.YELLOW), + AnsiBack.BLUE: (winterm.back, WinColor.BLUE), + AnsiBack.MAGENTA: (winterm.back, WinColor.MAGENTA), + AnsiBack.CYAN: (winterm.back, WinColor.CYAN), + AnsiBack.WHITE: (winterm.back, WinColor.GREY), + AnsiBack.RESET: (winterm.back, ), + AnsiBack.LIGHTBLACK_EX: (winterm.back, WinColor.BLACK, True), + AnsiBack.LIGHTRED_EX: (winterm.back, WinColor.RED, True), + AnsiBack.LIGHTGREEN_EX: (winterm.back, WinColor.GREEN, True), + AnsiBack.LIGHTYELLOW_EX: (winterm.back, WinColor.YELLOW, True), + AnsiBack.LIGHTBLUE_EX: (winterm.back, WinColor.BLUE, True), + AnsiBack.LIGHTMAGENTA_EX: (winterm.back, WinColor.MAGENTA, True), + AnsiBack.LIGHTCYAN_EX: (winterm.back, WinColor.CYAN, True), + AnsiBack.LIGHTWHITE_EX: (winterm.back, WinColor.GREY, True), + } + return dict() + + def write(self, text): + if self.strip or self.convert: + self.write_and_convert(text) + else: + self.wrapped.write(text) + self.wrapped.flush() + if self.autoreset: + self.reset_all() + + + def reset_all(self): + if self.convert: + self.call_win32('m', (0,)) + elif not self.strip and not self.stream.closed: + self.wrapped.write(Style.RESET_ALL) + + + def write_and_convert(self, text): + ''' + Write the given text to our wrapped stream, stripping any ANSI + sequences from the text, and optionally converting them into win32 + calls. + ''' + cursor = 0 + text = self.convert_osc(text) + for match in self.ANSI_CSI_RE.finditer(text): + start, end = match.span() + self.write_plain_text(text, cursor, start) + self.convert_ansi(*match.groups()) + cursor = end + self.write_plain_text(text, cursor, len(text)) + + + def write_plain_text(self, text, start, end): + if start < end: + self.wrapped.write(text[start:end]) + self.wrapped.flush() + + + def convert_ansi(self, paramstring, command): + if self.convert: + params = self.extract_params(command, paramstring) + self.call_win32(command, params) + + + def extract_params(self, command, paramstring): + if command in 'Hf': + params = tuple(int(p) if len(p) != 0 else 1 for p in paramstring.split(';')) + while len(params) < 2: + # defaults: + params = params + (1,) + else: + params = tuple(int(p) for p in paramstring.split(';') if len(p) != 0) + if len(params) == 0: + # defaults: + if command in 'JKm': + params = (0,) + elif command in 'ABCD': + params = (1,) + + return params + + + def call_win32(self, command, params): + if command == 'm': + for param in params: + if param in self.win32_calls: + func_args = self.win32_calls[param] + func = func_args[0] + args = func_args[1:] + kwargs = dict(on_stderr=self.on_stderr) + func(*args, **kwargs) + elif command in 'J': + winterm.erase_screen(params[0], on_stderr=self.on_stderr) + elif command in 'K': + winterm.erase_line(params[0], on_stderr=self.on_stderr) + elif command in 'Hf': # cursor position - absolute + winterm.set_cursor_position(params, on_stderr=self.on_stderr) + elif command in 'ABCD': # cursor position - relative + n = params[0] + # A - up, B - down, C - forward, D - back + x, y = {'A': (0, -n), 'B': (0, n), 'C': (n, 0), 'D': (-n, 0)}[command] + winterm.cursor_adjust(x, y, on_stderr=self.on_stderr) + + + def convert_osc(self, text): + for match in self.ANSI_OSC_RE.finditer(text): + start, end = match.span() + text = text[:start] + text[end:] + paramstring, command = match.groups() + if command == BEL: + if paramstring.count(";") == 1: + params = paramstring.split(";") + # 0 - change title and icon (we will only change title) + # 1 - change icon (we don't support this) + # 2 - change title + if params[0] in '02': + winterm.set_title(params[1]) + return text diff --git a/src/hunter/vendor/colorama/initialise.py b/src/hunter/vendor/colorama/initialise.py new file mode 100644 index 0000000..430d066 --- /dev/null +++ b/src/hunter/vendor/colorama/initialise.py @@ -0,0 +1,80 @@ +# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. +import atexit +import contextlib +import sys + +from .ansitowin32 import AnsiToWin32 + + +orig_stdout = None +orig_stderr = None + +wrapped_stdout = None +wrapped_stderr = None + +atexit_done = False + + +def reset_all(): + if AnsiToWin32 is not None: # Issue #74: objects might become None at exit + AnsiToWin32(orig_stdout).reset_all() + + +def init(autoreset=False, convert=None, strip=None, wrap=True): + + if not wrap and any([autoreset, convert, strip]): + raise ValueError('wrap=False conflicts with any other arg=True') + + global wrapped_stdout, wrapped_stderr + global orig_stdout, orig_stderr + + orig_stdout = sys.stdout + orig_stderr = sys.stderr + + if sys.stdout is None: + wrapped_stdout = None + else: + sys.stdout = wrapped_stdout = \ + wrap_stream(orig_stdout, convert, strip, autoreset, wrap) + if sys.stderr is None: + wrapped_stderr = None + else: + sys.stderr = wrapped_stderr = \ + wrap_stream(orig_stderr, convert, strip, autoreset, wrap) + + global atexit_done + if not atexit_done: + atexit.register(reset_all) + atexit_done = True + + +def deinit(): + if orig_stdout is not None: + sys.stdout = orig_stdout + if orig_stderr is not None: + sys.stderr = orig_stderr + + +@contextlib.contextmanager +def colorama_text(*args, **kwargs): + init(*args, **kwargs) + try: + yield + finally: + deinit() + + +def reinit(): + if wrapped_stdout is not None: + sys.stdout = wrapped_stdout + if wrapped_stderr is not None: + sys.stderr = wrapped_stderr + + +def wrap_stream(stream, convert, strip, autoreset, wrap): + if wrap: + wrapper = AnsiToWin32(stream, + convert=convert, strip=strip, autoreset=autoreset) + if wrapper.should_wrap(): + stream = wrapper.stream + return stream diff --git a/src/hunter/vendor/colorama/win32.py b/src/hunter/vendor/colorama/win32.py new file mode 100644 index 0000000..c2d8360 --- /dev/null +++ b/src/hunter/vendor/colorama/win32.py @@ -0,0 +1,152 @@ +# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. + +# from winbase.h +STDOUT = -11 +STDERR = -12 + +try: + import ctypes + from ctypes import LibraryLoader + windll = LibraryLoader(ctypes.WinDLL) + from ctypes import wintypes +except (AttributeError, ImportError): + windll = None + SetConsoleTextAttribute = lambda *_: None + winapi_test = lambda *_: None +else: + from ctypes import byref, Structure, c_char, POINTER + + COORD = wintypes._COORD + + class CONSOLE_SCREEN_BUFFER_INFO(Structure): + """struct in wincon.h.""" + _fields_ = [ + ("dwSize", COORD), + ("dwCursorPosition", COORD), + ("wAttributes", wintypes.WORD), + ("srWindow", wintypes.SMALL_RECT), + ("dwMaximumWindowSize", COORD), + ] + def __str__(self): + return '(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)' % ( + self.dwSize.Y, self.dwSize.X + , self.dwCursorPosition.Y, self.dwCursorPosition.X + , self.wAttributes + , self.srWindow.Top, self.srWindow.Left, self.srWindow.Bottom, self.srWindow.Right + , self.dwMaximumWindowSize.Y, self.dwMaximumWindowSize.X + ) + + _GetStdHandle = windll.kernel32.GetStdHandle + _GetStdHandle.argtypes = [ + wintypes.DWORD, + ] + _GetStdHandle.restype = wintypes.HANDLE + + _GetConsoleScreenBufferInfo = windll.kernel32.GetConsoleScreenBufferInfo + _GetConsoleScreenBufferInfo.argtypes = [ + wintypes.HANDLE, + POINTER(CONSOLE_SCREEN_BUFFER_INFO), + ] + _GetConsoleScreenBufferInfo.restype = wintypes.BOOL + + _SetConsoleTextAttribute = windll.kernel32.SetConsoleTextAttribute + _SetConsoleTextAttribute.argtypes = [ + wintypes.HANDLE, + wintypes.WORD, + ] + _SetConsoleTextAttribute.restype = wintypes.BOOL + + _SetConsoleCursorPosition = windll.kernel32.SetConsoleCursorPosition + _SetConsoleCursorPosition.argtypes = [ + wintypes.HANDLE, + COORD, + ] + _SetConsoleCursorPosition.restype = wintypes.BOOL + + _FillConsoleOutputCharacterA = windll.kernel32.FillConsoleOutputCharacterA + _FillConsoleOutputCharacterA.argtypes = [ + wintypes.HANDLE, + c_char, + wintypes.DWORD, + COORD, + POINTER(wintypes.DWORD), + ] + _FillConsoleOutputCharacterA.restype = wintypes.BOOL + + _FillConsoleOutputAttribute = windll.kernel32.FillConsoleOutputAttribute + _FillConsoleOutputAttribute.argtypes = [ + wintypes.HANDLE, + wintypes.WORD, + wintypes.DWORD, + COORD, + POINTER(wintypes.DWORD), + ] + _FillConsoleOutputAttribute.restype = wintypes.BOOL + + _SetConsoleTitleW = windll.kernel32.SetConsoleTitleW + _SetConsoleTitleW.argtypes = [ + wintypes.LPCWSTR + ] + _SetConsoleTitleW.restype = wintypes.BOOL + + def _winapi_test(handle): + csbi = CONSOLE_SCREEN_BUFFER_INFO() + success = _GetConsoleScreenBufferInfo( + handle, byref(csbi)) + return bool(success) + + def winapi_test(): + return any(_winapi_test(h) for h in + (_GetStdHandle(STDOUT), _GetStdHandle(STDERR))) + + def GetConsoleScreenBufferInfo(stream_id=STDOUT): + handle = _GetStdHandle(stream_id) + csbi = CONSOLE_SCREEN_BUFFER_INFO() + success = _GetConsoleScreenBufferInfo( + handle, byref(csbi)) + return csbi + + def SetConsoleTextAttribute(stream_id, attrs): + handle = _GetStdHandle(stream_id) + return _SetConsoleTextAttribute(handle, attrs) + + def SetConsoleCursorPosition(stream_id, position, adjust=True): + position = COORD(*position) + # If the position is out of range, do nothing. + if position.Y <= 0 or position.X <= 0: + return + # Adjust for Windows' SetConsoleCursorPosition: + # 1. being 0-based, while ANSI is 1-based. + # 2. expecting (x,y), while ANSI uses (y,x). + adjusted_position = COORD(position.Y - 1, position.X - 1) + if adjust: + # Adjust for viewport's scroll position + sr = GetConsoleScreenBufferInfo(STDOUT).srWindow + adjusted_position.Y += sr.Top + adjusted_position.X += sr.Left + # Resume normal processing + handle = _GetStdHandle(stream_id) + return _SetConsoleCursorPosition(handle, adjusted_position) + + def FillConsoleOutputCharacter(stream_id, char, length, start): + handle = _GetStdHandle(stream_id) + char = c_char(char.encode()) + length = wintypes.DWORD(length) + num_written = wintypes.DWORD(0) + # Note that this is hard-coded for ANSI (vs wide) bytes. + success = _FillConsoleOutputCharacterA( + handle, char, length, start, byref(num_written)) + return num_written.value + + def FillConsoleOutputAttribute(stream_id, attr, length, start): + ''' FillConsoleOutputAttribute( hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten )''' + handle = _GetStdHandle(stream_id) + attribute = wintypes.WORD(attr) + length = wintypes.DWORD(length) + num_written = wintypes.DWORD(0) + # Note that this is hard-coded for ANSI (vs wide) bytes. + return _FillConsoleOutputAttribute( + handle, attribute, length, start, byref(num_written)) + + def SetConsoleTitle(title): + return _SetConsoleTitleW(title) diff --git a/src/hunter/vendor/colorama/winterm.py b/src/hunter/vendor/colorama/winterm.py new file mode 100644 index 0000000..0fdb4ec --- /dev/null +++ b/src/hunter/vendor/colorama/winterm.py @@ -0,0 +1,169 @@ +# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. +from . import win32 + + +# from wincon.h +class WinColor(object): + BLACK = 0 + BLUE = 1 + GREEN = 2 + CYAN = 3 + RED = 4 + MAGENTA = 5 + YELLOW = 6 + GREY = 7 + +# from wincon.h +class WinStyle(object): + NORMAL = 0x00 # dim text, dim background + BRIGHT = 0x08 # bright text, dim background + BRIGHT_BACKGROUND = 0x80 # dim text, bright background + +class WinTerm(object): + + def __init__(self): + self._default = win32.GetConsoleScreenBufferInfo(win32.STDOUT).wAttributes + self.set_attrs(self._default) + self._default_fore = self._fore + self._default_back = self._back + self._default_style = self._style + # In order to emulate LIGHT_EX in windows, we borrow the BRIGHT style. + # So that LIGHT_EX colors and BRIGHT style do not clobber each other, + # we track them separately, since LIGHT_EX is overwritten by Fore/Back + # and BRIGHT is overwritten by Style codes. + self._light = 0 + + def get_attrs(self): + return self._fore + self._back * 16 + (self._style | self._light) + + def set_attrs(self, value): + self._fore = value & 7 + self._back = (value >> 4) & 7 + self._style = value & (WinStyle.BRIGHT | WinStyle.BRIGHT_BACKGROUND) + + def reset_all(self, on_stderr=None): + self.set_attrs(self._default) + self.set_console(attrs=self._default) + self._light = 0 + + def fore(self, fore=None, light=False, on_stderr=False): + if fore is None: + fore = self._default_fore + self._fore = fore + # Emulate LIGHT_EX with BRIGHT Style + if light: + self._light |= WinStyle.BRIGHT + else: + self._light &= ~WinStyle.BRIGHT + self.set_console(on_stderr=on_stderr) + + def back(self, back=None, light=False, on_stderr=False): + if back is None: + back = self._default_back + self._back = back + # Emulate LIGHT_EX with BRIGHT_BACKGROUND Style + if light: + self._light |= WinStyle.BRIGHT_BACKGROUND + else: + self._light &= ~WinStyle.BRIGHT_BACKGROUND + self.set_console(on_stderr=on_stderr) + + def style(self, style=None, on_stderr=False): + if style is None: + style = self._default_style + self._style = style + self.set_console(on_stderr=on_stderr) + + def set_console(self, attrs=None, on_stderr=False): + if attrs is None: + attrs = self.get_attrs() + handle = win32.STDOUT + if on_stderr: + handle = win32.STDERR + win32.SetConsoleTextAttribute(handle, attrs) + + def get_position(self, handle): + position = win32.GetConsoleScreenBufferInfo(handle).dwCursorPosition + # Because Windows coordinates are 0-based, + # and win32.SetConsoleCursorPosition expects 1-based. + position.X += 1 + position.Y += 1 + return position + + def set_cursor_position(self, position=None, on_stderr=False): + if position is None: + # I'm not currently tracking the position, so there is no default. + # position = self.get_position() + return + handle = win32.STDOUT + if on_stderr: + handle = win32.STDERR + win32.SetConsoleCursorPosition(handle, position) + + def cursor_adjust(self, x, y, on_stderr=False): + handle = win32.STDOUT + if on_stderr: + handle = win32.STDERR + position = self.get_position(handle) + adjusted_position = (position.Y + y, position.X + x) + win32.SetConsoleCursorPosition(handle, adjusted_position, adjust=False) + + def erase_screen(self, mode=0, on_stderr=False): + # 0 should clear from the cursor to the end of the screen. + # 1 should clear from the cursor to the beginning of the screen. + # 2 should clear the entire screen, and move cursor to (1,1) + handle = win32.STDOUT + if on_stderr: + handle = win32.STDERR + csbi = win32.GetConsoleScreenBufferInfo(handle) + # get the number of character cells in the current buffer + cells_in_screen = csbi.dwSize.X * csbi.dwSize.Y + # get number of character cells before current cursor position + cells_before_cursor = csbi.dwSize.X * csbi.dwCursorPosition.Y + csbi.dwCursorPosition.X + if mode == 0: + from_coord = csbi.dwCursorPosition + cells_to_erase = cells_in_screen - cells_before_cursor + elif mode == 1: + from_coord = win32.COORD(0, 0) + cells_to_erase = cells_before_cursor + elif mode == 2: + from_coord = win32.COORD(0, 0) + cells_to_erase = cells_in_screen + else: + # invalid mode + return + # fill the entire screen with blanks + win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord) + # now set the buffer's attributes accordingly + win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord) + if mode == 2: + # put the cursor where needed + win32.SetConsoleCursorPosition(handle, (1, 1)) + + def erase_line(self, mode=0, on_stderr=False): + # 0 should clear from the cursor to the end of the line. + # 1 should clear from the cursor to the beginning of the line. + # 2 should clear the entire line. + handle = win32.STDOUT + if on_stderr: + handle = win32.STDERR + csbi = win32.GetConsoleScreenBufferInfo(handle) + if mode == 0: + from_coord = csbi.dwCursorPosition + cells_to_erase = csbi.dwSize.X - csbi.dwCursorPosition.X + elif mode == 1: + from_coord = win32.COORD(0, csbi.dwCursorPosition.Y) + cells_to_erase = csbi.dwCursorPosition.X + elif mode == 2: + from_coord = win32.COORD(0, csbi.dwCursorPosition.Y) + cells_to_erase = csbi.dwSize.X + else: + # invalid mode + return + # fill the entire screen with blanks + win32.FillConsoleOutputCharacter(handle, ' ', cells_to_erase, from_coord) + # now set the buffer's attributes accordingly + win32.FillConsoleOutputAttribute(handle, self.get_attrs(), cells_to_erase, from_coord) + + def set_title(self, title): + win32.SetConsoleTitle(title) From b13df3b2f184fca70095dd4a3cb46c652168da1c Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Sun, 26 Apr 2020 23:32:18 +0300 Subject: [PATCH 14/38] create first cython version of backlog --- src/hunter/_predicates.pxd | 13 +++- src/hunter/_predicates.pyx | 143 ++++++++++++++++++++++++++++++++++++- src/hunter/predicates.py | 11 ++- 3 files changed, 159 insertions(+), 8 deletions(-) diff --git a/src/hunter/_predicates.pxd b/src/hunter/_predicates.pxd index 9799848..8fefd42 100644 --- a/src/hunter/_predicates.pxd +++ b/src/hunter/_predicates.pxd @@ -1,6 +1,6 @@ # cython: language_level=3str cimport cython - +from cpython cimport bool from ._event cimport Event @@ -48,6 +48,17 @@ cdef class From: readonly int origin_depth readonly int origin_calls +@cython.final +cdef class Backlog: + cdef: + object condition + int size + int stack + bool vars + bool strip + object action + object filter + cdef fast_And_call(And self, Event event) cdef fast_From_call(From self, Event event) cdef fast_Not_call(Not self, Event event) diff --git a/src/hunter/_predicates.pyx b/src/hunter/_predicates.pyx index f3a4197..6aff0c5 100644 --- a/src/hunter/_predicates.pyx +++ b/src/hunter/_predicates.pyx @@ -1,6 +1,7 @@ # cython: linetrace=True, language_level=3str from __future__ import absolute_import +from collections import deque import inspect import re from itertools import chain @@ -12,7 +13,7 @@ from cpython.object cimport Py_NE from ._event cimport Event -from .actions import Action +from .actions import Action, ColorStreamAction __all__ = ( 'And', @@ -390,6 +391,144 @@ cdef inline fast_From_call(From self, Event event): relative_event.calls = delta_calls return fast_call(self.predicate, relative_event) + +@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): + raise TypeError("Action %r must be a ColorStreamAction." % self.action) + self.condition = condition + self.queue = deque(maxlen=size) + self.size = size + self.stack = stack + self.strip = strip + self.vars = vars + self._filter = filter + + def __call__(self, event): + return fast_Backlog_call(self, event) + + 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 + ) + + def __repr__(self): + return '' % ( + self.condition, self.size, self.stack, self.vars, self.action, self._filter + ) + + def __eq__(self, other): + return ( + isinstance(other, Backlog) and + self.condition == ( other).condition and + self.size == ( other).size and + self.stack == ( other).stack and + self.vars == ( other).vars and + self.action == ( other).action + ) + + def __hash__(self): + return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) + + def __or__(self, other): + return Or(self, other) + + def __and__(self, other): + 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 __ror__(self, other): + return Or(other, self) + + def __rand__(self, other): + return And(other, self) + + def filter(self, *args, **kwargs): + from hunter import _merge + + if self.filter is not None: + args = (self.filter,) + args + + return Backlog( + self.condition, + size=self.size, stack=self.stack, vars=self.vars, action=self.action, + filter=_merge(*args, **kwargs) + ) + +cdef inline fast_Backlog_call(Backlog self, Event event): + cdef object result + cdef Event first_event + cdef basestring 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 detached_event + + result = fast_call(self.condition, event) + if result: + if self.queue: + self.action.cleanup() + + 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)) + if missing_depth: + if first_is_call: + first_frame = first_event.frame.f_back + else: + first_frame = first_event.frame + if first_frame: + stack_events = deque() + depth_delta = 0 + + 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 + ) + if not self.vars: + # noinspection PyPropertyAccess + stack_event.locals = {} + stack_event.globals = {} + stack_event.detached = True + stack_events.appendleft(stack_event) + + depth_delta += 1 + frame = first_frame.f_back + + for stack_event in stack_events: + if self._filter is None: + self.action(stack_event) + elif self._filter(stack_event): + self.action(stack_event) + for backlog_event in self.queue: + if self._filter is None: + self.action(backlog_event) + elif self._filter(backlog_event): + self.action(backlog_event) + 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. + 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 + self.queue.append(detached_event) + + return result + + @cython.final cdef class And: """ @@ -552,5 +691,7 @@ cdef inline fast_call(callable, Event event): 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) else: return callable(event) diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index bd606b3..7ba61c0 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -737,12 +737,11 @@ def __repr__(self): def __eq__(self, other): return ( isinstance(other, Backlog) and - self.condition == self.condition and - self.size == self.size and - self.stack == self.stack and - self.vars == self.vars and - self.action == self.action - + self.condition == other.condition and + self.size == other.size and + self.stack == other.stack and + self.vars == other.vars and + self.action == other.action ) def __hash__(self): From 33df824e4a575f7a204793c8ccc212b609a40d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:36:09 +0300 Subject: [PATCH 15/38] Add a comment. --- src/hunter/predicates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index bd606b3..7461e68 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -688,7 +688,7 @@ def __call__(self, event): else: first_frame = first_event.frame if first_frame: - stack_events = collections.deque() + stack_events = collections.deque() # a new deque because self.queue is limited, we can't add while it's full for depth_delta, frame in enumerate(islice(frame_iterator(first_frame), missing_depth)): stack_event = Event( frame=frame, kind='call', arg=None, From 85b5dc597c7bb996802db150312f0e9a8c24333e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:36:38 +0300 Subject: [PATCH 16/38] Another comment. --- src/hunter/predicates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 7461e68..4147450 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -678,9 +678,9 @@ def __call__(self, event): self.action.cleanup() first_event = self.queue[0] - first_is_call = first_event.kind == 'call' first_depth = first_event.depth backlog_call_depth = event.depth - first_depth + first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) if missing_depth: if first_is_call: From b3bef941f0bbf38cb767a2306ac33ef1a2f33441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:37:37 +0300 Subject: [PATCH 17/38] Add missing entry to __all__. --- src/hunter/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index de360a0..6713718 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -48,6 +48,7 @@ __all__ = ( 'And', + 'Backlog', 'CallPrinter', 'CodePrinter', 'Debugger', From 1ca7ac18c8ff8c21ff6dda5e590513c31a5d982d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:39:45 +0300 Subject: [PATCH 18/38] Temp. --- src/hunter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 6713718..0aa125f 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -33,13 +33,13 @@ except ImportError: from .event import Event # noqa 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 from .predicates import Query from .predicates import When from .tracer import Tracer +from .predicates import Backlog as _Backlog try: from ._version import version as __version__ From 8774c1011516897e76fd7016b69d25d3400b02b7 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Sun, 24 May 2020 00:29:31 +0300 Subject: [PATCH 19/38] 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[]]", From 5b255ed1c9ee73163a449621b555c9ce603e263f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:36:09 +0300 Subject: [PATCH 20/38] Add a comment. --- src/hunter/predicates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 7ba61c0..4f8ee46 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -688,7 +688,7 @@ def __call__(self, event): else: first_frame = first_event.frame if first_frame: - stack_events = collections.deque() + stack_events = collections.deque() # a new deque because self.queue is limited, we can't add while it's full for depth_delta, frame in enumerate(islice(frame_iterator(first_frame), missing_depth)): stack_event = Event( frame=frame, kind='call', arg=None, From 665ac2f4b6371c285fa2c6daac8f6d15a448b3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:36:38 +0300 Subject: [PATCH 21/38] Another comment. --- src/hunter/predicates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 4f8ee46..abaa6e8 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -678,9 +678,9 @@ def __call__(self, event): self.action.cleanup() first_event = self.queue[0] - first_is_call = first_event.kind == 'call' first_depth = first_event.depth backlog_call_depth = event.depth - first_depth + first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) if missing_depth: if first_is_call: From 72346233fbfa427246a792b7da9d1160c4560b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:37:37 +0300 Subject: [PATCH 22/38] Add missing entry to __all__. --- src/hunter/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index a8ce582..29b9288 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -48,6 +48,7 @@ __all__ = ( 'And', + 'Backlog', 'CallPrinter', 'CodePrinter', 'Debugger', From bb522c9ec6a9f551e4ed4f1e0fe8599aaca16d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sat, 23 May 2020 21:39:45 +0300 Subject: [PATCH 23/38] Temp. --- src/hunter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 29b9288..e8a5b74 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -33,13 +33,13 @@ except ImportError: from .event import Event # noqa 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 from .predicates import Query from .predicates import When from .tracer import Tracer +from .predicates import Backlog as _Backlog try: from ._version import version as __version__ From c1e8d8095449432f32a672c3ba495212aa78e50c Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Sun, 24 May 2020 00:41:07 +0300 Subject: [PATCH 24/38] remove unwanted imports --- src/hunter/__init__.py | 1 - tests/test_tracer.py | 1 - 2 files changed, 2 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index e8a5b74..87b80b1 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -39,7 +39,6 @@ from .predicates import Query from .predicates import When from .tracer import Tracer -from .predicates import Backlog as _Backlog try: from ._version import version as __version__ diff --git a/tests/test_tracer.py b/tests/test_tracer.py index e583aeb..3eb6f4c 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -1438,7 +1438,6 @@ def test_backlog_specific(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[]]", From 8bef2dcf1465e98f52376241e5c27a50bde2b918 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Sun, 24 May 2020 00:42:04 +0300 Subject: [PATCH 25/38] remove unwanted import --- src/hunter/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index e8a5b74..87b80b1 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -39,7 +39,6 @@ from .predicates import Query from .predicates import When from .tracer import Tracer -from .predicates import Backlog as _Backlog try: from ._version import version as __version__ From 822e6fd183b469ed16de69d3ceecdee67bc5044e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 24 May 2020 17:29:58 +0300 Subject: [PATCH 26/38] Replace set_frame workaround with proper interfacing. --- src/hunter/_event.c | 1602 +++++++++++++++++++----------------- src/hunter/_event.pxd | 1 + src/hunter/_event.pyx | 5 +- src/hunter/_predicates.c | 699 +++++++++++++--- src/hunter/_predicates.pyx | 4 +- src/hunter/_tracer.c | 210 ++++- 6 files changed, 1590 insertions(+), 931 deletions(-) diff --git a/src/hunter/_event.c b/src/hunter/_event.c index b13f315..183fd78 100644 --- a/src/hunter/_event.c +++ b/src/hunter/_event.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.14 */ +/* Generated by Cython 0.29.19 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,8 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_14" -#define CYTHON_HEX_VERSION 0x001D0EF0 +#define CYTHON_ABI "0_29_19" +#define CYTHON_HEX_VERSION 0x001D13F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -484,8 +484,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -576,11 +578,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -809,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_event.pyx", "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", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_tracer.pxd", }; @@ -819,6 +820,17 @@ static const char *__pyx_f[] = { struct __pyx_obj_6hunter_7_tracer_Tracer; struct __pyx_obj_6hunter_6_event_Event; struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines; +struct __pyx_opt_args_6hunter_6_event_5Event_detach; + +/* "hunter/_event.pxd":37 + * + * Event clone(self) + * Event detach(self, value_filter=?) # <<<<<<<<<<<<<< + */ +struct __pyx_opt_args_6hunter_6_event_5Event_detach { + int __pyx_n; + PyObject *value_filter; +}; /* "_tracer.pxd":28 * @@ -874,7 +886,7 @@ struct __pyx_obj_6hunter_6_event_Event { }; -/* "hunter/_event.pyx":314 +/* "hunter/_event.pyx":311 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -908,9 +920,11 @@ struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines { struct __pyx_vtabstruct_6hunter_6_event_Event { struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); + struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *); +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* --- Runtime support code (head) --- */ /* Refnanny.proto */ @@ -1567,6 +1581,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj /* SetVTable.proto */ static int __Pyx_SetVtable(PyObject *dict, void *vtable); +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -1706,6 +1723,7 @@ static int __Pyx_check_binary_version(void); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* proto*/ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto*/ /* Module declarations from 'cython' */ @@ -1913,7 +1931,6 @@ static const char __pyx_k_yield_lines[] = "yield_lines"; static const char __pyx_k_if_same_code[] = "if_same_code"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_stringsource[] = "stringsource"; -static const char __pyx_k_value_filter[] = "value_filter"; static const char __pyx_k_hunter__event[] = "hunter._event"; static const char __pyx_k_pkg_resources[] = "pkg_resources"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; @@ -2055,13 +2072,10 @@ static PyObject *__pyx_n_s_tokenize; static PyObject *__pyx_n_s_tracer; static PyObject *__pyx_n_s_update; 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, 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_2make_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 */ @@ -2075,7 +2089,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_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_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_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 */ @@ -2083,8 +2097,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_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_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_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*/ @@ -2127,6 +2141,9 @@ static int __pyx_pw_6hunter_6_event_5Event_1__init__(PyObject *__pyx_v_self, PyO PyObject *__pyx_v_depth = 0; PyObject *__pyx_v_calls = 0; PyObject *__pyx_v_threading_support = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -2259,6 +2276,9 @@ static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_e PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 44, 0, __PYX_ERR(0, 44, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_depth); @@ -2659,7 +2679,7 @@ static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_e * self._threadname = UNSET * self._thread = UNSET # <<<<<<<<<<<<<< * - * def detach(self, value_filter=None): + * cdef inline Event detach(self, value_filter=None): */ __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); @@ -2696,74 +2716,19 @@ static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_e /* "hunter/_event.pyx":76 * self._thread = UNSET * - * def detach(self, value_filter=None): # <<<<<<<<<<<<<< + * cdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * */ -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_value_filter = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("detach (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_filter,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_filter); - if (value) { values[0] = value; kw_args--; } - } - } - if (unlikely(kw_args > 0)) { - 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)) { - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_value_filter = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_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(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_6hunter_6_event_5Event_2detach(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), __pyx_v_value_filter); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_value_filter) { +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args) { + PyObject *__pyx_v_value_filter = ((PyObject *)Py_None); struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = NULL; PyObject *__pyx_7genexpr__pyx_v_key = NULL; PyObject *__pyx_7genexpr__pyx_v_value = NULL; PyObject *__pyx_8genexpr1__pyx_v_key = NULL; PyObject *__pyx_8genexpr1__pyx_v_value = NULL; - PyObject *__pyx_r = NULL; + struct __pyx_obj_6hunter_6_event_Event *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -2776,12 +2741,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte PyObject *__pyx_t_8 = NULL; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("detach", 0); __Pyx_TraceCall("detach", __pyx_f[0], 76, 0, __PYX_ERR(0, 76, __pyx_L1_error)); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_value_filter = __pyx_optional_args->value_filter; + } + } /* "hunter/_event.pyx":77 * - * def detach(self, value_filter=None): + * cdef inline Event detach(self, value_filter=None): * event = Event.__new__(Event) # <<<<<<<<<<<<<< * * event._code = self.code @@ -3276,15 +3249,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte * cdef inline Event clone(self): */ __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); + __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_event)); - __pyx_r = ((PyObject *)__pyx_v_event); + __pyx_r = __pyx_v_event; goto __pyx_L0; /* "hunter/_event.pyx":76 * self._thread = UNSET * - * def detach(self, value_filter=None): # <<<<<<<<<<<<<< + * cdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * */ @@ -3297,14 +3270,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("hunter._event.Event.detach", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_event); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_key); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_value); __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_key); __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_value); - __Pyx_XGIVEREF(__pyx_r); + __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -3327,6 +3300,9 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clone", 0); __Pyx_TraceCall("clone", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error)); @@ -3656,7 +3632,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl * event._thread = self._thread * return event # <<<<<<<<<<<<<< * - * def set_frame(self, frame): + * def make_fake_event(self): */ __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -3689,108 +3665,44 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl /* "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) { +static PyObject *__pyx_pw_6hunter_6_event_5Event_3make_fake_event(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_3make_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)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_2make_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) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_2make_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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_fake_event", 0); - __Pyx_TraceCall("make_fake_event", __pyx_f[0], 136, 0, __PYX_ERR(0, 136, __pyx_L1_error)); + __Pyx_TraceCall("make_fake_event", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error)); - /* "hunter/_event.pyx":137 + /* "hunter/_event.pyx":134 * * 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_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_locals); @@ -3798,15 +3710,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6make_fake_event(struct __pyx_o __pyx_v_self->_locals = __pyx_t_1; __pyx_t_1 = 0; - /* "hunter/_event.pyx":138 + /* "hunter/_event.pyx":135 * 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_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_globals); @@ -3814,18 +3726,18 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6make_fake_event(struct __pyx_o __pyx_v_self->_globals = __pyx_t_1; __pyx_t_1 = 0; - /* "hunter/_event.pyx":139 + /* "hunter/_event.pyx":136 * self._locals = {} * self._globals = {} * self.detached = True # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) + __Pyx_TraceLine(136,0,__PYX_ERR(0, 136, __pyx_L1_error)) __pyx_v_self->detached = 1; - /* "hunter/_event.pyx":136 - * self.frame = frame + /* "hunter/_event.pyx":133 + * return event * * def make_fake_event(self): # <<<<<<<<<<<<<< * self._locals = {} @@ -3846,7 +3758,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6make_fake_event(struct __pyx_o return __pyx_r; } -/* "hunter/_event.pyx":142 +/* "hunter/_event.pyx":139 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -3879,40 +3791,43 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 142, 0, __PYX_ERR(0, 142, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 139, 0, __PYX_ERR(0, 139, __pyx_L1_error)); - /* "hunter/_event.pyx":145 + /* "hunter/_event.pyx":142 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< * current = PyThread_get_thread_ident() * main = get_main_thread() */ - __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) + __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __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":146 + /* "hunter/_event.pyx":143 * * 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(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) + __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) __pyx_v_current = PyThread_get_thread_ident(); - /* "hunter/_event.pyx":147 + /* "hunter/_event.pyx":144 * 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(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_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -3926,20 +3841,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, 147, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __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":148 + /* "hunter/_event.pyx":145 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< * self._threadidn = None * else: */ - __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) + __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_main != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { @@ -3947,34 +3862,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, 148, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __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, 148, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main, __pyx_n_s_ident); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __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, 148, __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, 145, __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, 148, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 145, __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":149 + /* "hunter/_event.pyx":146 * main = get_main_thread() * if main is not None and current == main.ident: * self._threadidn = None # <<<<<<<<<<<<<< * else: * self._threadidn = current */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) + __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __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":148 + /* "hunter/_event.pyx":145 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< @@ -3984,16 +3899,16 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ goto __pyx_L4; } - /* "hunter/_event.pyx":151 + /* "hunter/_event.pyx":148 * self._threadidn = None * else: * self._threadidn = current # <<<<<<<<<<<<<< * return self._threadidn * */ - __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error)) + __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_threadidn); @@ -4003,7 +3918,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ } __pyx_L4:; - /* "hunter/_event.pyx":145 + /* "hunter/_event.pyx":142 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< @@ -4012,20 +3927,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":152 + /* "hunter/_event.pyx":149 * else: * self._threadidn = current * return self._threadidn # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) + __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __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":142 + /* "hunter/_event.pyx":139 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -4048,7 +3963,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":155 +/* "hunter/_event.pyx":152 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -4078,42 +3993,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 155, 0, __PYX_ERR(0, 155, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 152, 0, __PYX_ERR(0, 152, __pyx_L1_error)); - /* "hunter/_event.pyx":156 + /* "hunter/_event.pyx":153 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< * if self._thread is UNSET: * self._thread = current_thread() */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) + __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __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":157 + /* "hunter/_event.pyx":154 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< * self._thread = current_thread() * self._threadname = self._thread.name */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) + __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __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":158 + /* "hunter/_event.pyx":155 * if self._threadname is UNSET: * if self._thread is UNSET: * self._thread = current_thread() # <<<<<<<<<<<<<< * self._threadname = self._thread.name * return self._threadname */ - __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_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -4127,7 +4045,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, 158, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -4136,7 +4054,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":157 + /* "hunter/_event.pyx":154 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< @@ -4145,15 +4063,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":159 + /* "hunter/_event.pyx":156 * if self._thread is UNSET: * self._thread = current_thread() * self._threadname = self._thread.name # <<<<<<<<<<<<<< * return self._threadname * */ - __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_TraceLine(156,0,__PYX_ERR(0, 156, __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, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_threadname); @@ -4161,7 +4079,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":156 + /* "hunter/_event.pyx":153 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< @@ -4170,20 +4088,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":160 + /* "hunter/_event.pyx":157 * self._thread = current_thread() * self._threadname = self._thread.name * return self._threadname # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __pyx_L1_error)) + __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __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":155 + /* "hunter/_event.pyx":152 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -4205,7 +4123,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":163 +/* "hunter/_event.pyx":160 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -4233,42 +4151,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 163, 0, __PYX_ERR(0, 163, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 160, 0, __PYX_ERR(0, 160, __pyx_L1_error)); - /* "hunter/_event.pyx":164 + /* "hunter/_event.pyx":161 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals */ - __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) + __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __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":165 + /* "hunter/_event.pyx":162 * def locals(self): * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) # <<<<<<<<<<<<<< * self._locals = self.frame.f_locals * return self._locals */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) + __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __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":166 + /* "hunter/_event.pyx":163 * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals # <<<<<<<<<<<<<< * return self._locals * */ - __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __pyx_L1_error)) + __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_locals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4277,7 +4198,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":164 + /* "hunter/_event.pyx":161 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< @@ -4286,20 +4207,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":167 + /* "hunter/_event.pyx":164 * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals * return self._locals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(167,0,__PYX_ERR(0, 167, __pyx_L1_error)) + __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __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":163 + /* "hunter/_event.pyx":160 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -4319,7 +4240,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":170 +/* "hunter/_event.pyx":167 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -4347,29 +4268,32 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 170, 0, __PYX_ERR(0, 170, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 167, 0, __PYX_ERR(0, 167, __pyx_L1_error)); - /* "hunter/_event.pyx":171 + /* "hunter/_event.pyx":168 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< * self._globals = self.frame.f_globals * return self._globals */ - __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) + __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __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":172 + /* "hunter/_event.pyx":169 * def globals(self): * if self._globals is UNSET: * self._globals = self.frame.f_globals # <<<<<<<<<<<<<< * return self._globals * */ - __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __pyx_L1_error)) + __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_globals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4378,7 +4302,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":171 + /* "hunter/_event.pyx":168 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< @@ -4387,20 +4311,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o */ } - /* "hunter/_event.pyx":173 + /* "hunter/_event.pyx":170 * if self._globals is UNSET: * self._globals = self.frame.f_globals * return self._globals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(173,0,__PYX_ERR(0, 173, __pyx_L1_error)) + __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __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":170 + /* "hunter/_event.pyx":167 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -4420,7 +4344,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o return __pyx_r; } -/* "hunter/_event.pyx":176 +/* "hunter/_event.pyx":173 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4448,30 +4372,33 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 176, 0, __PYX_ERR(0, 176, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 173, 0, __PYX_ERR(0, 173, __pyx_L1_error)); - /* "hunter/_event.pyx":177 + /* "hunter/_event.pyx":174 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< * self._function = self.frame.f_code.co_name * return self._function */ - __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __pyx_L1_error)) + __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __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":178 + /* "hunter/_event.pyx":175 * def function(self): * if self._function is UNSET: * self._function = self.frame.f_code.co_name # <<<<<<<<<<<<<< * return self._function * */ - __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_TraceLine(175,0,__PYX_ERR(0, 175, __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, 175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_function); @@ -4479,7 +4406,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":177 + /* "hunter/_event.pyx":174 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< @@ -4488,20 +4415,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":179 + /* "hunter/_event.pyx":176 * if self._function is UNSET: * self._function = self.frame.f_code.co_name * return self._function # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error)) + __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __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":176 + /* "hunter/_event.pyx":173 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4521,7 +4448,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":182 +/* "hunter/_event.pyx":179 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -4563,62 +4490,65 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc Py_ssize_t __pyx_t_10; Py_ssize_t __pyx_t_11; int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 182, 0, __PYX_ERR(0, 182, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 179, 0, __PYX_ERR(0, 179, __pyx_L1_error)); - /* "hunter/_event.pyx":183 + /* "hunter/_event.pyx":180 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< * code = self.code * if code.co_name is None: */ - __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) + __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __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":184 + /* "hunter/_event.pyx":181 * def function_object(self): * if self._function_object is UNSET: * code = self.code # <<<<<<<<<<<<<< * if code.co_name is None: * return None */ - __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_TraceLine(181,0,__PYX_ERR(0, 181, __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, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_code = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":185 + /* "hunter/_event.pyx":182 * 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(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_TraceLine(182,0,__PYX_ERR(0, 182, __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, 182, __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":186 + /* "hunter/_event.pyx":183 * 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(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) + __Pyx_TraceLine(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "hunter/_event.pyx":185 + /* "hunter/_event.pyx":182 * if self._function_object is UNSET: * code = self.code * if code.co_name is None: # <<<<<<<<<<<<<< @@ -4627,20 +4557,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":188 + /* "hunter/_event.pyx":185 * 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(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_TraceLine(185,0,__PYX_ERR(0, 185, __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, 185, __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, 188, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 185, __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, 188, __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, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -4657,7 +4587,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, 188, __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, 185, __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; @@ -4666,14 +4596,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, 188, __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, 185, __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, 188, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 185, __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; @@ -4684,7 +4614,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, 188, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -4692,15 +4622,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":189 + /* "hunter/_event.pyx":186 * # 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(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_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4717,7 +4647,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, 189, __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, 186, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4725,13 +4655,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, 189, __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, 186, __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, 189, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 186, __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; @@ -4742,7 +4672,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, 189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -4750,14 +4680,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":194 + /* "hunter/_event.pyx":191 * # 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(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) + __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_func == Py_None); __pyx_t_9 = (__pyx_t_2 != 0); if (__pyx_t_9) { @@ -4765,32 +4695,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, 194, __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, 191, __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, 194, __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, 191, __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, 194, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 191, __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":195 + /* "hunter/_event.pyx":192 * # 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(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_TraceLine(192,0,__PYX_ERR(0, 192, __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, 192, __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, 195, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 192, __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, 195, __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, 192, __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, 195, __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, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4806,21 +4736,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, 195, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 192, __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":196 + /* "hunter/_event.pyx":193 * 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(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_TraceLine(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4837,7 +4767,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, 196, __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, 193, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -4845,13 +4775,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, 196, __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, 193, __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, 196, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __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; @@ -4862,7 +4792,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, 196, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -4870,7 +4800,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":194 + /* "hunter/_event.pyx":191 * # 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: # <<<<<<<<<<<<<< @@ -4879,34 +4809,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":199 + /* "hunter/_event.pyx":196 * # 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(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) + __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __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":200 + /* "hunter/_event.pyx":197 * # 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(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) + __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __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, 200, __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, 197, __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, 200, __pyx_L1_error) + __PYX_ERR(0, 197, __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_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, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); @@ -4915,34 +4845,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, 200, __pyx_L1_error) + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":201 + /* "hunter/_event.pyx":198 * 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(201,0,__PYX_ERR(0, 201, __pyx_L1_error)) + __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __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":202 + /* "hunter/_event.pyx":199 * 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(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) + __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) goto __pyx_L9_continue; - /* "hunter/_event.pyx":201 + /* "hunter/_event.pyx":198 * if func is None: * for v in self.globals.values(): * if not isinstance(v, type): # <<<<<<<<<<<<<< @@ -4951,15 +4881,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":203 + /* "hunter/_event.pyx":200 * if not isinstance(v, type): * continue * func = get_func_in_mro(v, code) # <<<<<<<<<<<<<< * if func is not None: * break */ - __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_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_12 = 0; @@ -4976,7 +4906,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, 203, __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, 200, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4984,13 +4914,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, 203, __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, 200, __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, 203, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 200, __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; @@ -5001,7 +4931,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, 203, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -5009,29 +4939,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":204 + /* "hunter/_event.pyx":201 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< * break * self._function_object = func */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) + __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __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":205 + /* "hunter/_event.pyx":202 * func = get_func_in_mro(v, code) * if func is not None: * break # <<<<<<<<<<<<<< * self._function_object = func * return self._function_object */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) + __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) goto __pyx_L10_break; - /* "hunter/_event.pyx":204 + /* "hunter/_event.pyx":201 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< @@ -5044,7 +4974,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":199 + /* "hunter/_event.pyx":196 * # 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: # <<<<<<<<<<<<<< @@ -5053,21 +4983,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":206 + /* "hunter/_event.pyx":203 * if func is not None: * break * self._function_object = func # <<<<<<<<<<<<<< * return self._function_object * */ - __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error)) + __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __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":183 + /* "hunter/_event.pyx":180 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< @@ -5076,20 +5006,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":207 + /* "hunter/_event.pyx":204 * break * self._function_object = func * return self._function_object # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) + __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __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":182 + /* "hunter/_event.pyx":179 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -5118,7 +5048,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc return __pyx_r; } -/* "hunter/_event.pyx":210 +/* "hunter/_event.pyx":207 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -5148,61 +5078,64 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 210, 0, __PYX_ERR(0, 210, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 207, 0, __PYX_ERR(0, 207, __pyx_L1_error)); - /* "hunter/_event.pyx":211 + /* "hunter/_event.pyx":208 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< * module = self.frame.f_globals.get('__name__', '') * if module is None: */ - __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error)) + __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __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":212 + /* "hunter/_event.pyx":209 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __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_TraceLine(209,0,__PYX_ERR(0, 209, __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, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __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_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __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":213 + /* "hunter/_event.pyx":210 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< * module = '' * */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) + __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __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":214 + /* "hunter/_event.pyx":211 * module = self.frame.f_globals.get('__name__', '') * if module is None: * module = '' # <<<<<<<<<<<<<< * * self._module = module */ - __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) + __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s__5); __Pyx_DECREF_SET(__pyx_v_module, __pyx_kp_s__5); - /* "hunter/_event.pyx":213 + /* "hunter/_event.pyx":210 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< @@ -5211,21 +5144,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":216 + /* "hunter/_event.pyx":213 * module = '' * * self._module = module # <<<<<<<<<<<<<< * return self._module * */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) + __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __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":211 + /* "hunter/_event.pyx":208 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< @@ -5234,20 +5167,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":217 + /* "hunter/_event.pyx":214 * * self._module = module * return self._module # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) + __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __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":210 + /* "hunter/_event.pyx":207 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -5269,7 +5202,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":220 +/* "hunter/_event.pyx":217 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5306,55 +5239,58 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ int __pyx_t_6; PyObject *__pyx_t_7 = NULL; Py_ssize_t __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 220, 0, __PYX_ERR(0, 220, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 217, 0, __PYX_ERR(0, 217, __pyx_L1_error)); - /* "hunter/_event.pyx":221 + /* "hunter/_event.pyx":218 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< * filename = self.frame.f_code.co_filename * if not filename: */ - __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) + __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __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":222 + /* "hunter/_event.pyx":219 * 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(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) + __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __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":223 + /* "hunter/_event.pyx":220 * 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(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_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":224 + /* "hunter/_event.pyx":221 * filename = self.frame.f_code.co_filename * if not filename: * filename = self.frame.f_globals.get('__file__') # <<<<<<<<<<<<<< * if not filename: * filename = '' */ - __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_TraceLine(221,0,__PYX_ERR(0, 221, __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, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5368,13 +5304,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, 224, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __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":223 + /* "hunter/_event.pyx":220 * if self._filename is UNSET: * filename = self.frame.f_code.co_filename * if not filename: # <<<<<<<<<<<<<< @@ -5383,30 +5319,30 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":222 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< * filename = '' * elif filename.endswith(('.pyc', '.pyo')): */ - __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_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":226 + /* "hunter/_event.pyx":223 * filename = self.frame.f_globals.get('__file__') * if not filename: * filename = '' # <<<<<<<<<<<<<< * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s__5); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_kp_s__5); - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":222 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< @@ -5416,15 +5352,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":227 + /* "hunter/_event.pyx":224 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __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_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); 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))) { @@ -5438,27 +5374,27 @@ 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_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, 227, __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_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 227, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":228 + /* "hunter/_event.pyx":225 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __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_TraceLine(225,0,__PYX_ERR(0, 225, __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, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":227 + /* "hunter/_event.pyx":224 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< @@ -5468,15 +5404,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":229 + /* "hunter/_event.pyx":226 * 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(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_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5490,24 +5426,24 @@ 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_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, 229, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __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, 229, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":230 + /* "hunter/_event.pyx":227 * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) # <<<<<<<<<<<<<< * for ext in ('.pyx', '.py'): * cyfilename = basename + ext */ - __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_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __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, 230, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5525,7 +5461,7 @@ 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__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_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, 227, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -5533,13 +5469,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { 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_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, 227, __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, 230, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 227, __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; @@ -5550,7 +5486,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ __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, 230, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -5558,48 +5494,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":231 + /* "hunter/_event.pyx":228 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) + __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __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, 231, __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, 228, __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, 231, __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, 228, __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":232 + /* "hunter/_event.pyx":229 * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): * cyfilename = basename + ext # <<<<<<<<<<<<<< * if exists(cyfilename): * filename = cyfilename */ - __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_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) + __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_cyfilename, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":233 + /* "hunter/_event.pyx":230 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< * filename = cyfilename * break */ - __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_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -5613,35 +5549,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, 233, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 230, __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, 233, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":234 + /* "hunter/_event.pyx":231 * cyfilename = basename + ext * if exists(cyfilename): * filename = cyfilename # <<<<<<<<<<<<<< * break * */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) + __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_cyfilename); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_v_cyfilename); - /* "hunter/_event.pyx":235 + /* "hunter/_event.pyx":232 * if exists(cyfilename): * filename = cyfilename * break # <<<<<<<<<<<<<< * * self._filename = filename */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) + __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) goto __pyx_L7_break; - /* "hunter/_event.pyx":233 + /* "hunter/_event.pyx":230 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< @@ -5650,19 +5586,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":231 + /* "hunter/_event.pyx":228 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) + __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) } __pyx_L7_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":229 + /* "hunter/_event.pyx":226 * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -5672,21 +5608,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } __pyx_L5:; - /* "hunter/_event.pyx":237 + /* "hunter/_event.pyx":234 * break * * self._filename = filename # <<<<<<<<<<<<<< * return self._filename * */ - __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __pyx_L1_error)) + __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __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":221 + /* "hunter/_event.pyx":218 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< @@ -5695,20 +5631,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":238 + /* "hunter/_event.pyx":235 * * self._filename = filename * return self._filename # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(238,0,__PYX_ERR(0, 238, __pyx_L1_error)) + __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __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":220 + /* "hunter/_event.pyx":217 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5735,7 +5671,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":241 +/* "hunter/_event.pyx":238 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5763,30 +5699,33 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 241, 0, __PYX_ERR(0, 241, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error)); - /* "hunter/_event.pyx":242 + /* "hunter/_event.pyx":239 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< * self._lineno = self.frame.f_lineno * return self._lineno */ - __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __pyx_L1_error)) + __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __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":243 + /* "hunter/_event.pyx":240 * def lineno(self): * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno # <<<<<<<<<<<<<< * return self._lineno * */ - __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_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_lineno); @@ -5794,7 +5733,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":242 + /* "hunter/_event.pyx":239 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< @@ -5803,20 +5742,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":244 + /* "hunter/_event.pyx":241 * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno * return self._lineno # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) + __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __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":241 + /* "hunter/_event.pyx":238 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5836,7 +5775,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":247 +/* "hunter/_event.pyx":244 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5863,35 +5802,38 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 247, 0, __PYX_ERR(0, 247, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 244, 0, __PYX_ERR(0, 244, __pyx_L1_error)); - /* "hunter/_event.pyx":248 + /* "hunter/_event.pyx":245 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< * return self.frame.f_code * else: */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) + __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __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":249 + /* "hunter/_event.pyx":246 * def code(self): * if self._code is UNSET: * return self.frame.f_code # <<<<<<<<<<<<<< * else: * return self._code */ - __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __pyx_L1_error)) + __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __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":248 + /* "hunter/_event.pyx":245 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< @@ -5900,14 +5842,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ */ } - /* "hunter/_event.pyx":251 + /* "hunter/_event.pyx":248 * return self.frame.f_code * else: * return self._code # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) + __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_code); @@ -5915,7 +5857,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ goto __pyx_L0; } - /* "hunter/_event.pyx":247 + /* "hunter/_event.pyx":244 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5934,7 +5876,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_event.pyx":254 +/* "hunter/_event.pyx":251 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -5966,32 +5908,35 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 254, 0, __PYX_ERR(0, 254, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 251, 0, __PYX_ERR(0, 251, __pyx_L1_error)); - /* "hunter/_event.pyx":255 + /* "hunter/_event.pyx":252 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: */ - __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __pyx_L1_error)) + __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __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":256 + /* "hunter/_event.pyx":253 * 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(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_TraceLine(253,0,__PYX_ERR(0, 253, __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, 253, __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, 256, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -6006,39 +5951,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __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, 256, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __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":257 + /* "hunter/_event.pyx":254 * 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(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_TraceLine(254,0,__PYX_ERR(0, 254, __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, 254, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":259 + /* "hunter/_event.pyx":256 * 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(259,0,__PYX_ERR(0, 259, __pyx_L1_error)) + __Pyx_TraceLine(256,0,__PYX_ERR(0, 256, __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":257 + /* "hunter/_event.pyx":254 * if self._stdlib is UNSET: * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: # <<<<<<<<<<<<<< @@ -6048,26 +5993,26 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":260 + /* "hunter/_event.pyx":257 * # 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(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_TraceLine(257,0,__PYX_ERR(0, 257, __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, 257, __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, 260, __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, 257, __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, 260, __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, 257, __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, 260, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -6082,39 +6027,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, 260, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __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, 260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 257, __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, 260, __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, 257, __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, 260, __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, 257, __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":262 + /* "hunter/_event.pyx":259 * 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(262,0,__PYX_ERR(0, 262, __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":260 + /* "hunter/_event.pyx":257 * # skip this over-vendored module * self._stdlib = True * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): # <<<<<<<<<<<<<< @@ -6124,20 +6069,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":263 + /* "hunter/_event.pyx":260 * # 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(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_TraceLine(260,0,__PYX_ERR(0, 260, __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, 260, __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, 263, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __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, 263, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -6152,28 +6097,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, 263, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __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, 263, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":265 + /* "hunter/_event.pyx":262 * 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(265,0,__PYX_ERR(0, 265, __pyx_L1_error)) + __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __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":263 + /* "hunter/_event.pyx":260 * # skip namedtuple exec garbage * self._stdlib = True * elif self.filename.startswith(SITE_PACKAGES_PATHS): # <<<<<<<<<<<<<< @@ -6183,20 +6128,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":266 + /* "hunter/_event.pyx":263 * # 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(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_TraceLine(263,0,__PYX_ERR(0, 263, __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, 263, __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, 266, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 263, __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, 266, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -6211,28 +6156,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, 266, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __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, 266, __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":267 + /* "hunter/_event.pyx":264 * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): * self._stdlib = True # <<<<<<<<<<<<<< * else: * self._stdlib = False */ - __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error)) + __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __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":266 + /* "hunter/_event.pyx":263 * # if it's in site-packages then its definitely not stdlib * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): # <<<<<<<<<<<<<< @@ -6242,14 +6187,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":269 + /* "hunter/_event.pyx":266 * self._stdlib = True * else: * self._stdlib = False # <<<<<<<<<<<<<< * return self._stdlib * */ - __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error)) + __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); @@ -6259,7 +6204,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __pyx_L4:; - /* "hunter/_event.pyx":255 + /* "hunter/_event.pyx":252 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< @@ -6268,20 +6213,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":270 + /* "hunter/_event.pyx":267 * else: * self._stdlib = False * return self._stdlib # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error)) + __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __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":254 + /* "hunter/_event.pyx":251 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -6305,7 +6250,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":273 +/* "hunter/_event.pyx":270 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -6364,29 +6309,32 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p PyObject *__pyx_t_27 = NULL; PyObject *__pyx_t_28 = NULL; PyObject *__pyx_t_29 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 273, 0, __PYX_ERR(0, 273, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 270, 0, __PYX_ERR(0, 270, __pyx_L1_error)); - /* "hunter/_event.pyx":276 + /* "hunter/_event.pyx":273 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< * try: * self._fullsource = None */ - __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L1_error)) + __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __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":277 + /* "hunter/_event.pyx":274 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< * self._fullsource = None * */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L1_error)) + __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6396,64 +6344,64 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "hunter/_event.pyx":278 + /* "hunter/_event.pyx":275 * if self._fullsource is UNSET: * try: * self._fullsource = None # <<<<<<<<<<<<<< * * if self.kind == 'call' and self.frame.f_code.co_name != "": */ - __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L4_error)) + __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __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":280 + /* "hunter/_event.pyx":277 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< * lines = [] * try: */ - __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_TraceLine(277,0,__PYX_ERR(0, 277, __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, 277, __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, 280, __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, 277, __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, 280, __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, 277, __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":281 + /* "hunter/_event.pyx":278 * * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] # <<<<<<<<<<<<<< * try: * for _, token, _, _, line in generate_tokens(partial( */ - __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_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L4_error)) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_lines = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "hunter/_event.pyx":282 + /* "hunter/_event.pyx":279 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< * for _, token, _, _, line in generate_tokens(partial( * next, */ - __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L4_error)) + __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6463,45 +6411,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "hunter/_event.pyx":283 + /* "hunter/_event.pyx":280 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __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_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 280, __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, 283, __pyx_L13_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 280, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_13); - /* "hunter/_event.pyx":284 + /* "hunter/_event.pyx":281 * try: * for _, token, _, _, line in generate_tokens(partial( * next, # <<<<<<<<<<<<<< * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): */ - __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_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L13_error)) + __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 281, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_14); - /* "hunter/_event.pyx":285 + /* "hunter/_event.pyx":282 * 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(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_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 282, __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, 285, __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, 282, __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, 285, __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, 282, __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, 285, __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, 282, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; @@ -6519,7 +6467,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, 285, __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, 282, __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; @@ -6529,7 +6477,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, 285, __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, 282, __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; @@ -6537,7 +6485,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, 285, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(4+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 282, __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; @@ -6554,7 +6502,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, 285, __pyx_L13_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 282, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6574,7 +6522,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, 283, __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, 280, __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; @@ -6584,7 +6532,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, 283, __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, 280, __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; @@ -6592,7 +6540,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, 283, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 280, __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; @@ -6603,7 +6551,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, 283, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_21, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 280, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6621,25 +6569,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, 283, __pyx_L13_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":283 + /* "hunter/_event.pyx":280 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L13_error)) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __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, 283, __pyx_L13_error) + __pyx_t_22 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 280, __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, 283, __pyx_L13_error) + __pyx_t_23 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 280, __pyx_L13_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -6647,17 +6595,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, 283, __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, 280, __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, 283, __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, 280, __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, 283, __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, 280, __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, 283, __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, 280, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -6667,7 +6615,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, 283, __pyx_L13_error) + else __PYX_ERR(0, 280, __pyx_L13_error) } break; } @@ -6679,7 +6627,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, 283, __pyx_L13_error) + __PYX_ERR(0, 280, __pyx_L13_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6705,7 +6653,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, 283, __pyx_L13_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 280, __pyx_L13_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -6715,7 +6663,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, 283, __pyx_L13_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 280, __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; @@ -6724,7 +6672,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, 283, __pyx_L13_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_16), 5) < 0) __PYX_ERR(0, 280, __pyx_L13_error) __pyx_t_24 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L22_unpacking_done; @@ -6732,7 +6680,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, 283, __pyx_L13_error) + __PYX_ERR(0, 280, __pyx_L13_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); @@ -6746,44 +6694,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":287 + /* "hunter/_event.pyx":284 * 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(287,0,__PYX_ERR(0, 287, __pyx_L13_error)) + __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __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, 287, __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, 284, __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, 287, __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, 284, __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, 287, __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, 284, __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":288 + /* "hunter/_event.pyx":285 * )): * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) # <<<<<<<<<<<<<< * break * except TokenError: */ - __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_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L13_error)) + __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_fullsource); @@ -6791,17 +6739,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":289 + /* "hunter/_event.pyx":286 * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) * break # <<<<<<<<<<<<<< * except TokenError: * pass */ - __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __pyx_L13_error)) + __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L13_error)) goto __pyx_L20_break; - /* "hunter/_event.pyx":287 + /* "hunter/_event.pyx":284 * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): * if token in ("def", "class", "lambda"): # <<<<<<<<<<<<<< @@ -6810,19 +6758,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":283 + /* "hunter/_event.pyx":280 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __pyx_L13_error)) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) } __pyx_L20_break:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":282 + /* "hunter/_event.pyx":279 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6847,16 +6795,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":290 + /* "hunter/_event.pyx":287 * self._fullsource = ''.join(lines) * break * except TokenError: # <<<<<<<<<<<<<< * pass * if self._fullsource is None: */ - __Pyx_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L15_except_error)) + __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __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, 290, __pyx_L15_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_TokenError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 287, __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; @@ -6869,7 +6817,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":282 + /* "hunter/_event.pyx":279 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6889,7 +6837,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L18_try_end:; } - /* "hunter/_event.pyx":280 + /* "hunter/_event.pyx":277 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< @@ -6898,31 +6846,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":292 + /* "hunter/_event.pyx":289 * 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(292,0,__PYX_ERR(0, 292, __pyx_L4_error)) + __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __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":293 + /* "hunter/_event.pyx":290 * 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(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_TraceLine(290,0,__PYX_ERR(0, 290, __pyx_L4_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __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, 293, __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, 290, __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, 293, __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, 290, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_21 = NULL; __pyx_t_20 = 0; @@ -6939,7 +6887,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, 293, __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, 290, __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; @@ -6949,7 +6897,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, 293, __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, 290, __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; @@ -6957,7 +6905,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, 293, __pyx_L4_error) + __pyx_t_13 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 290, __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; @@ -6971,7 +6919,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, 293, __pyx_L4_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 290, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -6982,7 +6930,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":292 + /* "hunter/_event.pyx":289 * except TokenError: * pass * if self._fullsource is None: # <<<<<<<<<<<<<< @@ -6991,7 +6939,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":277 + /* "hunter/_event.pyx":274 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -7016,18 +6964,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":294 + /* "hunter/_event.pyx":291 * 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(294,0,__PYX_ERR(0, 294, __pyx_L6_except_error)) + __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __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, 294, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 291, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_13); @@ -7035,15 +6983,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_v_exc = __pyx_t_7; /*try:*/ { - /* "hunter/_event.pyx":295 + /* "hunter/_event.pyx":292 * 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(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_TraceLine(292,0,__PYX_ERR(0, 292, __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, 292, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_21 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -7057,7 +7005,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, 295, __pyx_L33_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 292, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GIVEREF(__pyx_t_15); @@ -7067,14 +7015,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_t_15 = 0; } - /* "hunter/_event.pyx":294 + /* "hunter/_event.pyx":291 * 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(294,0,__PYX_ERR(0, 294, __pyx_L33_error)) + __Pyx_TraceLine(291,0,__PYX_ERR(0, 291, __pyx_L33_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7131,7 +7079,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":277 + /* "hunter/_event.pyx":274 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -7151,7 +7099,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L9_try_end:; } - /* "hunter/_event.pyx":276 + /* "hunter/_event.pyx":273 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< @@ -7160,20 +7108,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":296 + /* "hunter/_event.pyx":293 * except Exception as exc: * self._fullsource = "??? NO SOURCE: {!r}".format(exc) * return self._fullsource # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error)) + __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __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":273 + /* "hunter/_event.pyx":270 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -7208,7 +7156,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":299 +/* "hunter/_event.pyx":296 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7256,32 +7204,35 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 299, 0, __PYX_ERR(0, 299, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 296, 0, __PYX_ERR(0, 296, __pyx_L1_error)); - /* "hunter/_event.pyx":300 + /* "hunter/_event.pyx":297 * @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(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) + __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __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":301 + /* "hunter/_event.pyx":298 * 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(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_TraceLine(298,0,__PYX_ERR(0, 298, __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, 298, __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, 301, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -7296,28 +7247,28 @@ 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_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, 301, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __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, 301, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":302 + /* "hunter/_event.pyx":299 * 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(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_TraceLine(299,0,__PYX_ERR(0, 299, __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, 299, __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, 302, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_splitext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 299, __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, 302, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_basename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 299, __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, 302, __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, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -7332,7 +7283,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, 302, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -7348,10 +7299,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, 302, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __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, 302, __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, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -7367,7 +7318,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, 302, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -7376,7 +7327,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":301 + /* "hunter/_event.pyx":298 * def source(self): * if self._source is UNSET: * if self.filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -7385,14 +7336,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":303 + /* "hunter/_event.pyx":300 * 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(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) + __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -7402,19 +7353,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "hunter/_event.pyx":304 + /* "hunter/_event.pyx":301 * 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(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_TraceLine(301,0,__PYX_ERR(0, 301, __pyx_L5_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __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, 304, __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, 301, __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, 304, __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, 301, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_14 = 0; @@ -7431,7 +7382,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, 304, __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, 301, __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; @@ -7441,7 +7392,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, 304, __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, 301, __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; @@ -7449,7 +7400,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, 304, __pyx_L5_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 301, __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; @@ -7463,7 +7414,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, 304, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -7474,7 +7425,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":303 + /* "hunter/_event.pyx":300 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7496,18 +7447,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":305 + /* "hunter/_event.pyx":302 * 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(305,0,__PYX_ERR(0, 305, __pyx_L7_except_error)) + __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __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, 305, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 302, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); @@ -7515,15 +7466,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_v_exc = __pyx_t_5; /*try:*/ { - /* "hunter/_event.pyx":306 + /* "hunter/_event.pyx":303 * 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(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_TraceLine(303,0,__PYX_ERR(0, 303, __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, 303, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -7537,7 +7488,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, 306, __pyx_L16_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 303, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -7547,14 +7498,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_4 = 0; } - /* "hunter/_event.pyx":305 + /* "hunter/_event.pyx":302 * 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(305,0,__PYX_ERR(0, 305, __pyx_L16_error)) + __Pyx_TraceLine(302,0,__PYX_ERR(0, 302, __pyx_L16_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7608,7 +7559,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":303 + /* "hunter/_event.pyx":300 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7628,7 +7579,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_L10_try_end:; } - /* "hunter/_event.pyx":300 + /* "hunter/_event.pyx":297 * @property * def source(self): * if self._source is UNSET: # <<<<<<<<<<<<<< @@ -7637,20 +7588,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":308 + /* "hunter/_event.pyx":305 * self._source = "??? NO SOURCE: {!r}".format(exc) * * return self._source # <<<<<<<<<<<<<< * * def __getitem__(self, item): */ - __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) + __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __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":299 + /* "hunter/_event.pyx":296 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7678,7 +7629,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":310 +/* "hunter/_event.pyx":307 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7687,42 +7638,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ /* Python wrapper */ -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) { +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) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_8__getitem__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_4__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_8__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_4__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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 310, 0, __PYX_ERR(0, 310, __pyx_L1_error)); + __Pyx_TraceCall("__getitem__", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error)); - /* "hunter/_event.pyx":311 + /* "hunter/_event.pyx":308 * * def __getitem__(self, item): * return getattr(self, item) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error)) + __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __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, 311, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_item); 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/_event.pyx":310 + /* "hunter/_event.pyx":307 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7767,6 +7721,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5frame___get__(struct __pyx_obj PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 13, 0, __PYX_ERR(1, 13, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -7810,6 +7767,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4kind___get__(struct __pyx_obj_ PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 14, 0, __PYX_ERR(1, 14, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -7853,6 +7813,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_3arg___get__(struct __pyx_obj_6 PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 15, 0, __PYX_ERR(1, 15, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -7897,6 +7860,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -7944,6 +7910,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5calls___get__(struct __pyx_obj __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 17, 0, __PYX_ERR(1, 17, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -7991,6 +7960,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_17threading_support___get__(str __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 18, 0, __PYX_ERR(1, 18, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -8038,6 +8010,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8detached___get__(struct __pyx_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 19, 0, __PYX_ERR(1, 19, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -8066,19 +8041,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8detached___get__(struct __pyx_ */ /* Python wrapper */ -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) { +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) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_10__reduce_cython__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_6__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_10__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_6__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; @@ -8093,6 +8068,9 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10__reduce_cython__(struct __py int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -8498,23 +8476,26 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10__reduce_cython__(struct __py */ /* Python wrapper */ -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) { +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) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __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)); + __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)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -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) { +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) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -8551,7 +8532,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_12__setstate_cython__(struct __ } 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":314 +/* "hunter/_event.pyx":311 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -8568,6 +8549,9 @@ static PyObject *__pyx_pw_6hunter_6_event_1yield_lines(PyObject *__pyx_self, PyO PyObject *__pyx_v_start = 0; PyObject *__pyx_v_collector = 0; PyObject *__pyx_v_limit = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("yield_lines (wrapper)", 0); @@ -8601,19 +8585,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, 314, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 1); __PYX_ERR(0, 311, __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, 314, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 2); __PYX_ERR(0, 311, __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, 314, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 3); __PYX_ERR(0, 311, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -8623,7 +8607,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, 314, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "yield_lines") < 0)) __PYX_ERR(0, 311, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8645,13 +8629,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, 314, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 311, __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, 314, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_collector), (&PyList_Type), 1, "collector", 1))) __PYX_ERR(0, 311, __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 */ @@ -8667,12 +8651,15 @@ static PyObject *__pyx_pf_6hunter_6_event_yield_lines(CYTHON_UNUSED PyObject *__ struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("yield_lines", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines *)__pyx_tp_new_6hunter_6_event___pyx_scope_struct__yield_lines(__pyx_ptype_6hunter_6_event___pyx_scope_struct__yield_lines, __pyx_empty_tuple, NULL); 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, 314, __pyx_L1_error) + __PYX_ERR(0, 311, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8692,7 +8679,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__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_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, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8724,10 +8711,13 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py int __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("yield_lines", 0); __Pyx_TraceFrameInit(__pyx_codeobj__12) - __Pyx_TraceCall("yield_lines", __pyx_f[0], 314, 0, __PYX_ERR(0, 314, __pyx_L1_error)); + __Pyx_TraceCall("yield_lines", __pyx_f[0], 311, 0, __PYX_ERR(0, 311, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; @@ -8737,39 +8727,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, 314, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 311, __pyx_L1_error) - /* "hunter/_event.pyx":316 + /* "hunter/_event.pyx":313 * 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(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) + __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_dedent = Py_None; - /* "hunter/_event.pyx":317 + /* "hunter/_event.pyx":314 * limit=10): * dedent = None * amount = 0 # <<<<<<<<<<<<<< * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: */ - __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) + __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_amount = 0; - /* "hunter/_event.pyx":318 + /* "hunter/_event.pyx":315 * 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(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_TraceLine(315,0,__PYX_ERR(0, 315, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8786,7 +8776,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, 318, __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, 315, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8794,13 +8784,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, 318, __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, 315, __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, 318, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __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; @@ -8811,14 +8801,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, 318, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __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, 318, __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, 315, __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, 318, __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, 315, __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; @@ -8826,9 +8816,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, 318, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __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, 318, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 315, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -8836,17 +8826,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, 318, __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, 315, __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, 318, __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, 315, __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, 318, __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, 315, __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, 318, __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, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -8856,7 +8846,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, 318, __pyx_L1_error) + else __PYX_ERR(0, 315, __pyx_L1_error) } break; } @@ -8867,29 +8857,29 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":319 + /* "hunter/_event.pyx":316 * 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(319,0,__PYX_ERR(0, 319, __pyx_L1_error)) + __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __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":320 + /* "hunter/_event.pyx":317 * 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(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_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __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, 320, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -8904,7 +8894,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, 320, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __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); @@ -8912,17 +8902,17 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":321 + /* "hunter/_event.pyx":318 * 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(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) + __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __pyx_L1_error)) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 318, __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, 321, __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, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -8935,18 +8925,18 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":322 + /* "hunter/_event.pyx":319 * dedent = LEADING_WHITESPACE_RE.findall(line) * dedent = dedent[0] if dedent else "" * amount = len(dedent) # <<<<<<<<<<<<<< * elif not line.startswith(dedent): * break */ - __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_TraceLine(319,0,__PYX_ERR(0, 319, __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, 319, __pyx_L1_error) __pyx_cur_scope->__pyx_v_amount = __pyx_t_10; - /* "hunter/_event.pyx":319 + /* "hunter/_event.pyx":316 * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: # <<<<<<<<<<<<<< @@ -8956,15 +8946,15 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py goto __pyx_L6; } - /* "hunter/_event.pyx":323 + /* "hunter/_event.pyx":320 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< * break * collector.append(line) */ - __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_TraceLine(320,0,__PYX_ERR(0, 320, __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, 320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -8978,25 +8968,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, 323, __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_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 323, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 320, __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":324 + /* "hunter/_event.pyx":321 * amount = len(dedent) * elif not line.startswith(dedent): * break # <<<<<<<<<<<<<< * collector.append(line) * yield line[amount:] */ - __Pyx_TraceLine(324,0,__PYX_ERR(0, 324, __pyx_L1_error)) + __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error)) goto __pyx_L5_break; - /* "hunter/_event.pyx":323 + /* "hunter/_event.pyx":320 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< @@ -9006,26 +8996,26 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py } __pyx_L6:; - /* "hunter/_event.pyx":325 + /* "hunter/_event.pyx":322 * elif not line.startswith(dedent): * break * collector.append(line) # <<<<<<<<<<<<<< * yield line[amount:] */ - __Pyx_TraceLine(325,0,__PYX_ERR(0, 325, __pyx_L1_error)) + __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __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, 325, __pyx_L1_error) + __PYX_ERR(0, 322, __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) + __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, 322, __pyx_L1_error) - /* "hunter/_event.pyx":326 + /* "hunter/_event.pyx":323 * break * collector.append(line) * yield line[amount:] # <<<<<<<<<<<<<< */ - __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_TraceLine(323,0,__PYX_ERR(0, 323, __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, 323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -9046,22 +9036,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, 326, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 323, __pyx_L1_error) - /* "hunter/_event.pyx":318 + /* "hunter/_event.pyx":315 * 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(318,0,__PYX_ERR(0, 318, __pyx_L1_error)) + __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __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":314 + /* "hunter/_event.pyx":311 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -9103,6 +9093,9 @@ static PyObject *__pyx_pw_6hunter_6_event_4__pyx_unpickle_Event(PyObject *__pyx_ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Event (wrapper)", 0); @@ -9181,6 +9174,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -9381,6 +9377,9 @@ static PyObject *__pyx_f_6hunter_6_event___pyx_unpickle_Event__set_state(struct PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Event__set_state", 0); __Pyx_TraceCall("__pyx_unpickle_Event__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); @@ -9957,11 +9956,9 @@ 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}, - {"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}, + {"make_fake_event", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_3make_fake_event, METH_NOARGS, 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}, {0, 0, 0, 0} }; @@ -10004,7 +10001,7 @@ static PySequenceMethods __pyx_tp_as_sequence_Event = { static PyMappingMethods __pyx_tp_as_mapping_Event = { 0, /*mp_length*/ - __pyx_pw_6hunter_6_event_5Event_9__getitem__, /*mp_subscript*/ + __pyx_pw_6hunter_6_event_5Event_5__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; @@ -10377,7 +10374,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_tracer, __pyx_k_tracer, sizeof(__pyx_k_tracer), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_util, __pyx_k_util, sizeof(__pyx_k_util), 0, 0, 1, 1}, - {&__pyx_n_s_value_filter, __pyx_k_value_filter, sizeof(__pyx_k_value_filter), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_yield_lines, __pyx_k_yield_lines, sizeof(__pyx_k_yield_lines), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} @@ -10405,58 +10401,58 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "hunter/_event.pyx":212 + /* "hunter/_event.pyx":209 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __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_tuple__6 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "hunter/_event.pyx":227 + /* "hunter/_event.pyx":224 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __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_tuple__7 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "hunter/_event.pyx":228 + /* "hunter/_event.pyx":225 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __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_slice__8 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8); - /* "hunter/_event.pyx":229 + /* "hunter/_event.pyx":226 * 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__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_tuple__9 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "hunter/_event.pyx":231 + /* "hunter/_event.pyx":228 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __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_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); @@ -10471,17 +10467,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "hunter/_event.pyx":314 + /* "hunter/_event.pyx":311 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __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_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, 311, __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) + __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, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 311, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -10545,10 +10541,14 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- 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; + __pyx_vtable_6hunter_6_event_Event.detach = (struct __pyx_obj_6hunter_6_event_Event *(*)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args))__pyx_f_6hunter_6_event_5Event_detach; 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; @@ -10560,7 +10560,7 @@ static int __Pyx_modinit_type_init_code(void) { 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, 314, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines) < 0) __PYX_ERR(0, 311, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines.tp_print = 0; #endif @@ -10579,6 +10579,9 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) @@ -10640,17 +10643,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -10734,6 +10739,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__event(PyObject *__pyx_pyinit_modu __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -10822,15 +10830,15 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ @@ -11233,6 +11241,16 @@ if (!__Pyx_RefNanny) { __pyx_k__3 = __pyx_v_6hunter_6_event_UNSET; __Pyx_GIVEREF(__pyx_v_6hunter_6_event_UNSET); + /* "hunter/_event.pyx":76 + * self._thread = UNSET + * + * cdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< + * event = Event.__new__(Event) + * + */ + __Pyx_TraceLine(76,0,__PYX_ERR(0, 76, __pyx_L1_error)) + + /* "hunter/_event.pyx":109 * return event * @@ -11243,17 +11261,17 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) - /* "hunter/_event.pyx":314 + /* "hunter/_event.pyx":311 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __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_TraceLine(311,0,__PYX_ERR(0, 311, __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, 311, __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, 314, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yield_lines, __pyx_t_1) < 0) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":1 @@ -11422,7 +11440,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -11449,7 +11467,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -11465,7 +11483,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -13353,7 +13371,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -13491,6 +13509,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { return -1; } +/* PyObjectGetAttrStrNoError */ +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -13518,43 +13558,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -13630,7 +13678,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -13734,7 +13782,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } diff --git a/src/hunter/_event.pxd b/src/hunter/_event.pxd index b8989e9..ad3fd71 100644 --- a/src/hunter/_event.pxd +++ b/src/hunter/_event.pxd @@ -34,3 +34,4 @@ cdef class Event: object _threadname Event clone(self) + Event detach(self, value_filter=?) diff --git a/src/hunter/_event.pyx b/src/hunter/_event.pyx index 0b35768..7ff7800 100644 --- a/src/hunter/_event.pyx +++ b/src/hunter/_event.pyx @@ -73,7 +73,7 @@ cdef class Event: self._threadname = UNSET self._thread = UNSET - def detach(self, value_filter=None): + cdef inline Event detach(self, value_filter=None): event = Event.__new__(Event) event._code = self.code @@ -130,9 +130,6 @@ 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 = {} diff --git a/src/hunter/_predicates.c b/src/hunter/_predicates.c index 101f123..53759d1 100644 --- a/src/hunter/_predicates.c +++ b/src/hunter/_predicates.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.14 */ +/* Generated by Cython 0.29.19 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,8 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_14" -#define CYTHON_HEX_VERSION 0x001D0EF0 +#define CYTHON_ABI "0_29_19" +#define CYTHON_HEX_VERSION 0x001D13F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -484,8 +484,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -576,11 +578,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -809,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_predicates.pyx", "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", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_tracer.pxd", "src/hunter/_event.pxd", }; @@ -839,6 +840,17 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr; +struct __pyx_opt_args_6hunter_6_event_5Event_detach; + +/* "_event.pxd":37 + * + * Event clone(self) + * Event detach(self, value_filter=?) # <<<<<<<<<<<<<< + */ +struct __pyx_opt_args_6hunter_6_event_5Event_detach { + int __pyx_n; + PyObject *value_filter; +}; /* "_tracer.pxd":28 * @@ -1204,6 +1216,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr { struct __pyx_vtabstruct_6hunter_6_event_Event { struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); + struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; @@ -1877,6 +1890,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -2263,7 +2279,6 @@ 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"; @@ -2303,7 +2318,6 @@ 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"; @@ -2426,7 +2440,6 @@ 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; @@ -2514,7 +2527,6 @@ 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; @@ -2772,6 +2784,9 @@ static int __pyx_pf_6hunter_11_predicates_5Query___init__(struct __pyx_obj_6hunt int __pyx_t_13; int __pyx_t_14; int __pyx_t_15; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 47, 0, __PYX_ERR(0, 47, __pyx_L1_error)); @@ -4182,6 +4197,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___7genexpr_genexpr struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_2_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_2_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_2_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -4224,6 +4242,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___7genexpr_2genera PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 143, 0, __PYX_ERR(0, 143, __pyx_L1_error)); @@ -4396,6 +4417,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_7__str___genexpr(PyObject struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_1_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_1_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -4443,6 +4467,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_7__str___2generator(__pyx PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 143, 0, __PYX_ERR(0, 143, __pyx_L1_error)); @@ -4834,6 +4861,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_2__str__(struct __pyx_obj __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct____str__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct____str__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct____str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -4952,6 +4982,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8__repr___genexpr(PyObjec struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_4_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_4_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_4_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -4999,6 +5032,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_5Query_8__repr___2generator2(__p PyObject *__pyx_t_11 = NULL; Py_ssize_t __pyx_t_12; int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 161, 0, __PYX_ERR(0, 161, __pyx_L1_error)); @@ -5385,6 +5421,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_4__repr__(struct __pyx_ob __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_3___repr__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_3___repr__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_3___repr__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -5488,6 +5527,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_6__eq__(struct __pyx_obj_ PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 176, 0, __PYX_ERR(0, 176, __pyx_L1_error)); @@ -5755,6 +5797,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_5Query_8__hash__(struct __pyx_ob __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 191, 0, __PYX_ERR(0, 191, __pyx_L1_error)); @@ -5847,6 +5892,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_5Query_8__hash__(struct __pyx_ob static PyObject *__pyx_pw_6hunter_11_predicates_5Query_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6hunter_11_predicates_5Query_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -5903,6 +5951,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_10__call__(struct __pyx_o __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 206, 0, __PYX_ERR(0, 206, __pyx_L1_error)); @@ -5968,6 +6019,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_12__or__(PyObject *__pyx_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 209, 0, __PYX_ERR(0, 209, __pyx_L1_error)); @@ -6043,6 +6097,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_14__and__(PyObject *__pyx __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error)); @@ -6117,6 +6174,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_16__invert__(struct __pyx __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 215, 0, __PYX_ERR(0, 215, __pyx_L1_error)); @@ -6180,6 +6240,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_14query_contains___get__( PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 10, 0, __PYX_ERR(1, 10, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6223,6 +6286,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_14query_endswith___get__( PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6266,6 +6332,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8query_eq___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 12, 0, __PYX_ERR(1, 12, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6309,6 +6378,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8query_gt___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 13, 0, __PYX_ERR(1, 13, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6352,6 +6424,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_9query_gte___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 14, 0, __PYX_ERR(1, 14, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6395,6 +6470,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8query_in___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 15, 0, __PYX_ERR(1, 15, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6438,6 +6516,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_8query_lt___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6481,6 +6562,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_9query_lte___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 17, 0, __PYX_ERR(1, 17, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6524,6 +6608,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_11query_regex___get__(str PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 18, 0, __PYX_ERR(1, 18, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6567,6 +6654,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_16query_startswith___get_ PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 19, 0, __PYX_ERR(1, 19, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -6617,6 +6707,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_18__reduce_cython__(struc PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -6947,6 +7040,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_5Query_20__setstate_cython__(str __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -7006,6 +7102,9 @@ static PyObject *__pyx_f_6hunter_11_predicates_fast_Query_call(struct __pyx_obj_ PyObject *(*__pyx_t_7)(PyObject *); int __pyx_t_8; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Query_call", 0); __Pyx_TraceCall("fast_Query_call", __pyx_f[0], 218, 0, __PYX_ERR(0, 218, __pyx_L1_error)); @@ -8435,6 +8534,9 @@ static int __pyx_pw_6hunter_11_predicates_4When_1__init__(PyObject *__pyx_v_self static int __pyx_pw_6hunter_11_predicates_4When_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_condition = 0; PyObject *__pyx_v_actions = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -8507,6 +8609,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_8__init___genexpr(PyObject struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_6_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_6_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_6_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -8550,6 +8655,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_8__init___2generator3(__py PyObject *__pyx_t_7 = NULL; int __pyx_t_8; int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 276, 0, __PYX_ERR(0, 276, __pyx_L1_error)); @@ -8734,6 +8842,9 @@ static int __pyx_pf_6hunter_11_predicates_4When___init__(struct __pyx_obj_6hunte int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_5___init__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_5___init__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_5___init__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -8882,6 +8993,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_7__str___genexpr(PyObject struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_8_genexpr(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -8919,6 +9033,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_4When_7__str___2generator4(__pyx PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 282, 0, __PYX_ERR(0, 282, __pyx_L1_error)); @@ -9008,6 +9125,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_2__str__(struct __pyx_obj_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __pyx_cur_scope = (struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_7___str__ *)__pyx_tp_new_6hunter_11_predicates___pyx_scope_struct_7___str__(__pyx_ptype_6hunter_11_predicates___pyx_scope_struct_7___str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -9127,6 +9247,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_4__repr__(struct __pyx_obj __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 285, 0, __PYX_ERR(0, 285, __pyx_L1_error)); @@ -9203,6 +9326,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_6__eq__(struct __pyx_obj_6 PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 288, 0, __PYX_ERR(0, 288, __pyx_L1_error)); @@ -9318,6 +9444,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4When_8__hash__(struct __pyx_obj __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 295, 0, __PYX_ERR(0, 295, __pyx_L1_error)); @@ -9377,6 +9506,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4When_8__hash__(struct __pyx_obj static PyObject *__pyx_pw_6hunter_11_predicates_4When_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6hunter_11_predicates_4When_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -9433,6 +9565,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_10__call__(struct __pyx_ob __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 298, 0, __PYX_ERR(0, 298, __pyx_L1_error)); @@ -9498,6 +9633,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_12__or__(PyObject *__pyx_v __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 301, 0, __PYX_ERR(0, 301, __pyx_L1_error)); @@ -9573,6 +9711,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_14__and__(PyObject *__pyx_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 304, 0, __PYX_ERR(0, 304, __pyx_L1_error)); @@ -9647,6 +9788,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_16__invert__(struct __pyx_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error)); @@ -9710,6 +9854,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_9condition___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 39, 0, __PYX_ERR(1, 39, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -9753,6 +9900,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_7actions___get__(struct __ PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 40, 0, __PYX_ERR(1, 40, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -9803,6 +9953,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_18__reduce_cython__(struct PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -10053,6 +10206,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4When_20__setstate_cython__(stru __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -10108,6 +10264,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_When_call(stru Py_ssize_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_When_call", 0); __Pyx_TraceCall("fast_When_call", __pyx_f[0], 310, 0, __PYX_ERR(0, 310, __pyx_L1_error)); @@ -10260,6 +10419,9 @@ static int __pyx_pw_6hunter_11_predicates_4From_1__init__(PyObject *__pyx_v_self PyObject *__pyx_v_condition = 0; PyObject *__pyx_v_predicate = 0; PyObject *__pyx_v_watermark = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -10337,6 +10499,9 @@ static int __pyx_pf_6hunter_11_predicates_4From___init__(struct __pyx_obj_6hunte __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations int __pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 328, 0, __PYX_ERR(0, 328, __pyx_L1_error)); @@ -10446,6 +10611,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_2__str__(struct __pyx_obj_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __Pyx_TraceCall("__str__", __pyx_f[0], 335, 0, __PYX_ERR(0, 335, __pyx_L1_error)); @@ -10544,6 +10712,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_4__repr__(struct __pyx_obj __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 340, 0, __PYX_ERR(0, 340, __pyx_L1_error)); @@ -10643,6 +10814,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_6__eq__(struct __pyx_obj_6 PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 345, 0, __PYX_ERR(0, 345, __pyx_L1_error)); @@ -10758,6 +10932,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4From_8__hash__(struct __pyx_obj __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 352, 0, __PYX_ERR(0, 352, __pyx_L1_error)); @@ -10817,6 +10994,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_4From_8__hash__(struct __pyx_obj static PyObject *__pyx_pw_6hunter_11_predicates_4From_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_6hunter_11_predicates_4From_11__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -10873,6 +11053,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_10__call__(struct __pyx_ob __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 355, 0, __PYX_ERR(0, 355, __pyx_L1_error)); @@ -10938,6 +11121,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12__or__(PyObject *__pyx_v __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 358, 0, __PYX_ERR(0, 358, __pyx_L1_error)); @@ -11013,6 +11199,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_14__and__(PyObject *__pyx_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 361, 0, __PYX_ERR(0, 361, __pyx_L1_error)); @@ -11087,6 +11276,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_16__invert__(struct __pyx_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 364, 0, __PYX_ERR(0, 364, __pyx_L1_error)); @@ -11150,6 +11342,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_9condition___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 45, 0, __PYX_ERR(1, 45, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -11193,6 +11388,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_9predicate___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 46, 0, __PYX_ERR(1, 46, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -11237,6 +11435,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_9watermark___get__(struct __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 47, 0, __PYX_ERR(1, 47, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -11284,6 +11485,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12origin_depth___get__(str __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 48, 0, __PYX_ERR(1, 48, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -11331,6 +11535,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_12origin_calls___get__(str __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 49, 0, __PYX_ERR(1, 49, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -11385,6 +11592,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_18__reduce_cython__(struct int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -11651,6 +11861,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_4From_20__setstate_cython__(stru __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -11707,6 +11920,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_From_call", 0); __Pyx_TraceCall("fast_From_call", __pyx_f[0], 367, 0, __PYX_ERR(0, 367, __pyx_L1_error)); @@ -12011,6 +12227,9 @@ static int __pyx_pw_6hunter_11_predicates_7Backlog_1__init__(PyObject *__pyx_v_s PyObject *__pyx_v_strip = 0; PyObject *__pyx_v_action = 0; PyObject *__pyx_v_filter = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -12143,6 +12362,9 @@ static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hu int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 399, 0, __PYX_ERR(0, 399, __pyx_L1_error)); @@ -12404,6 +12626,9 @@ static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hu 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -12455,6 +12680,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_2__call__(struct __pyx_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 411, 0, __PYX_ERR(0, 411, __pyx_L1_error)); @@ -12522,6 +12750,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_o PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __Pyx_TraceCall("__str__", __pyx_f[0], 414, 0, __PYX_ERR(0, 414, __pyx_L1_error)); @@ -12633,6 +12864,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 419, 0, __PYX_ERR(0, 419, __pyx_L1_error)); @@ -12744,6 +12978,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_ob PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 424, 0, __PYX_ERR(0, 424, __pyx_L1_error)); @@ -12916,6 +13153,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_hash_t __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 434, 0, __PYX_ERR(0, 434, __pyx_L1_error)); @@ -13008,6 +13248,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_12__or__(PyObject *__py __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error)); @@ -13083,6 +13326,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_14__and__(PyObject *__p __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 440, 0, __PYX_ERR(0, 440, __pyx_L1_error)); @@ -13159,6 +13405,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(struct __p PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 443, 0, __PYX_ERR(0, 443, __pyx_L1_error)); @@ -13248,6 +13497,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(struct __pyx_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ror__", 0); __Pyx_TraceCall("__ror__", __pyx_f[0], 446, 0, __PYX_ERR(0, 446, __pyx_L1_error)); @@ -13323,6 +13575,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_20__rand__(struct __pyx __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__rand__", 0); __Pyx_TraceCall("__rand__", __pyx_f[0], 449, 0, __PYX_ERR(0, 449, __pyx_L1_error)); @@ -13415,6 +13670,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_22filter(struct __pyx_o int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("filter", 0); __Pyx_TraceCall("filter", __pyx_f[0], 452, 0, __PYX_ERR(0, 452, __pyx_L1_error)); __Pyx_INCREF(__pyx_v_args); @@ -13617,6 +13875,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -13917,6 +14178,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_26__setstate_cython__(s __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -13969,7 +14233,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s int __pyx_v_missing_depth; int __pyx_v_depth_delta; PyObject *__pyx_v_stack_events = 0; - PyObject *__pyx_v_detached_event = 0; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_detached_event = 0; PyFrameObject *__pyx_v_frame = 0; PyFrameObject *__pyx_v_first_frame = 0; PyObject *__pyx_v_stack_event = NULL; @@ -13988,7 +14252,11 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); int __pyx_t_11; - int __pyx_t_12; + struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_12; + int __pyx_t_13; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Backlog_call", 0); __Pyx_TraceCall("fast_Backlog_call", __pyx_f[0], 464, 0, __PYX_ERR(0, 464, __pyx_L1_error)); @@ -14929,7 +15197,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * 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) + * detached_event.frame = event.frame */ __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_filter == Py_None); @@ -14965,84 +15233,60 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * 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) + * detached_event.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; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __pyx_t_2 = 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 = Py_None; } - __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; + __pyx_t_12.__pyx_n = 1; + __pyx_t_12.value_filter = __pyx_t_1; + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_detached_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); + __pyx_t_2 = 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) # <<<<<<<<<<<<<< + * detached_event.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; + __pyx_t_2 = ((PyObject *)__pyx_v_event->frame); + __Pyx_INCREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_detached_event->frame); + __Pyx_DECREF(((PyObject *)__pyx_v_detached_event->frame)); + __pyx_v_detached_event->frame = ((PyFrameObject *)__pyx_t_2); + __pyx_t_2 = 0; /* "hunter/_predicates.pyx":530 * detached_event = event.detach(self.action.try_repr if self.vars else None) - * detached_event.set_frame(event.frame) + * detached_event.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) + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_13 == ((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) + * detached_event.frame = event.frame */ } } @@ -15082,7 +15326,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __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_detached_event); __Pyx_XDECREF((PyObject *)__pyx_v_frame); __Pyx_XDECREF((PyObject *)__pyx_v_first_frame); __Pyx_XDECREF(__pyx_v_stack_event); @@ -15123,6 +15367,9 @@ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error)); @@ -15194,6 +15441,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(PyObject * struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_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)) { @@ -15231,6 +15481,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error)); @@ -15320,6 +15573,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6 __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__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)) { @@ -15404,6 +15660,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __pyx_L1_error)); @@ -15477,6 +15736,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 549, 0, __PYX_ERR(0, 549, __pyx_L1_error)); @@ -15573,6 +15835,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 555, 0, __PYX_ERR(0, 555, __pyx_L1_error)); @@ -15629,6 +15894,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -15685,6 +15953,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __pyx_L1_error)); @@ -15750,6 +16021,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 561, 0, __PYX_ERR(0, 561, __pyx_L1_error)); @@ -15829,6 +16103,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 564, 0, __PYX_ERR(0, 564, __pyx_L1_error)); @@ -16000,6 +16277,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_o __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 576, 0, __PYX_ERR(0, 576, __pyx_L1_error)); @@ -16063,6 +16343,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10predicates___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 24, 0, __PYX_ERR(1, 24, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -16112,6 +16395,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_18__reduce_cython__(struct int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -16349,6 +16635,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struc __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -16402,6 +16691,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_And_call", 0); __Pyx_TraceCall("fast_And_call", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error)); @@ -16555,6 +16847,9 @@ static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_ int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 593, 0, __PYX_ERR(0, 593, __pyx_L1_error)); @@ -16626,6 +16921,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *_ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_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)) { @@ -16663,6 +16961,9 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); __Pyx_TraceCall("genexpr", __pyx_f[0], 597, 0, __PYX_ERR(0, 597, __pyx_L1_error)); @@ -16752,6 +17053,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__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); if (unlikely(!__pyx_cur_scope)) { @@ -16836,6 +17140,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 599, 0, __PYX_ERR(0, 599, __pyx_L1_error)); @@ -16909,6 +17216,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error)); @@ -17005,6 +17315,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error)); @@ -17061,6 +17374,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -17117,6 +17433,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); @@ -17186,6 +17505,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error)); @@ -17358,6 +17680,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 626, 0, __PYX_ERR(0, 626, __pyx_L1_error)); @@ -17432,6 +17757,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error)); @@ -17495,6 +17823,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(struct PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 29, 0, __PYX_ERR(1, 29, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -17544,6 +17875,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_18__reduce_cython__(struct _ int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -17781,6 +18115,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -17833,6 +18170,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Or_call", 0); __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error)); @@ -17967,6 +18307,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); @@ -18017,6 +18360,9 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_TraceCall("__init__", __pyx_f[0], 644, 0, __PYX_ERR(0, 644, __pyx_L1_error)); @@ -18080,6 +18426,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __Pyx_TraceCall("__str__", __pyx_f[0], 647, 0, __PYX_ERR(0, 647, __pyx_L1_error)); @@ -18144,6 +18493,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error)); @@ -18210,6 +18562,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_TraceCall("__eq__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error)); @@ -18306,6 +18661,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_hash_t __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); __Pyx_TraceCall("__hash__", __pyx_f[0], 659, 0, __PYX_ERR(0, 659, __pyx_L1_error)); @@ -18362,6 +18720,9 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -18418,6 +18779,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 662, 0, __PYX_ERR(0, 662, __pyx_L1_error)); @@ -18486,6 +18850,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); __Pyx_TraceCall("__or__", __pyx_f[0], 665, 0, __PYX_ERR(0, 665, __pyx_L1_error)); @@ -18623,6 +18990,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); __Pyx_TraceCall("__and__", __pyx_f[0], 671, 0, __PYX_ERR(0, 671, __pyx_L1_error)); @@ -18755,6 +19125,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_o PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); __Pyx_TraceCall("__invert__", __pyx_f[0], 677, 0, __PYX_ERR(0, 677, __pyx_L1_error)); @@ -18815,6 +19188,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(struct _ PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[1], 34, 0, __PYX_ERR(1, 34, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -18864,6 +19240,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); @@ -19101,6 +19480,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); @@ -19151,6 +19533,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struc PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Not_call", 0); __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error)); @@ -19214,6 +19599,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_call", 0); __Pyx_TraceCall("fast_call", __pyx_f[0], 684, 0, __PYX_ERR(0, 684, __pyx_L1_error)); @@ -19533,6 +19921,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_1__pyx_unpickle_Query(PyObject * PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Query (wrapper)", 0); @@ -19611,6 +20002,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -19810,6 +20204,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -20047,6 +20444,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3__pyx_unpickle_When(PyObject *_ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_When (wrapper)", 0); @@ -20125,6 +20525,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -20324,6 +20727,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_When__set_state(st PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -20464,6 +20870,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_5__pyx_unpickle_From(PyObject *_ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_From (wrapper)", 0); @@ -20542,6 +20951,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -20742,6 +21154,9 @@ 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __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)); @@ -20908,6 +21323,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog(PyObject PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Backlog (wrapper)", 0); @@ -20986,6 +21404,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_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)); @@ -21186,6 +21607,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__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)); @@ -21389,6 +21813,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And(PyObject *__ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_And (wrapper)", 0); @@ -21467,6 +21894,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_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)); @@ -21666,6 +22096,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_And__set_state", 0); __Pyx_TraceCall("__pyx_unpickle_And__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); @@ -21795,6 +22228,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or(PyObject *__ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Or (wrapper)", 0); @@ -21873,6 +22309,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_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)); @@ -22072,6 +22511,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Or__set_state", 0); __Pyx_TraceCall("__pyx_unpickle_Or__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); @@ -22201,6 +22643,9 @@ static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not(PyObject *_ PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Not (wrapper)", 0); @@ -22279,6 +22724,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_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)); @@ -22478,6 +22926,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(str PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Not__set_state", 0); __Pyx_TraceCall("__pyx_unpickle_Not__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); @@ -25813,7 +26264,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__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}, @@ -25901,7 +26351,6 @@ 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}, @@ -26069,6 +26518,9 @@ static int __Pyx_modinit_variable_export_code(void) { static int __Pyx_modinit_function_export_code(void) { __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ if (__Pyx_ExportFunction("fast_And_call", (void (*)(void))__pyx_f_6hunter_11_predicates_fast_And_call, "PyObject *(struct __pyx_obj_6hunter_11_predicates_And *, struct __pyx_obj_6hunter_6_event_Event *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) @@ -26087,6 +26539,9 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Query) < 0) __PYX_ERR(0, 41, __pyx_L1_error) @@ -26284,6 +26739,9 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) @@ -26351,17 +26809,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -26445,6 +26905,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__predicates(PyObject *__pyx_pyinit __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -26533,15 +26996,15 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); - if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); (void)__Pyx_modinit_function_import_code(); /*--- Execution code ---*/ @@ -28268,7 +28731,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -28295,7 +28758,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -28311,7 +28774,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -28581,7 +29044,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -28719,6 +29182,28 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj } #endif +/* PyObjectGetAttrStrNoError */ +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -28746,43 +29231,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -28943,7 +29436,7 @@ static PyObject* __Pyx_patch_inspect(PyObject* module) { /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -29047,7 +29540,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } diff --git a/src/hunter/_predicates.pyx b/src/hunter/_predicates.pyx index ebe6b40..6757526 100644 --- a/src/hunter/_predicates.pyx +++ b/src/hunter/_predicates.pyx @@ -470,7 +470,7 @@ cdef inline fast_Backlog_call(Backlog self, Event event): cdef int missing_depth cdef int depth_delta cdef object stack_events - cdef object detached_event + cdef Event detached_event cdef FrameType frame cdef FrameType first_frame @@ -526,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.set_frame(event.frame) + detached_event.frame = event.frame self.queue.append(detached_event) return result diff --git a/src/hunter/_tracer.c b/src/hunter/_tracer.c index 1198c93..6ffbc1e 100644 --- a/src/hunter/_tracer.c +++ b/src/hunter/_tracer.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.14 */ +/* Generated by Cython 0.29.19 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,8 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_14" -#define CYTHON_HEX_VERSION 0x001D0EF0 +#define CYTHON_ABI "0_29_19" +#define CYTHON_HEX_VERSION 0x001D13F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -484,8 +484,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact +#ifndef PyObject_Unicode #define PyObject_Unicode PyObject_Str #endif +#endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) @@ -576,11 +578,10 @@ static CYTHON_INLINE float __PYX_NAN() { #define __Pyx_truncl truncl #endif - +#define __PYX_MARK_ERR_POS(f_index, lineno) \ + { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } #define __PYX_ERR(f_index, lineno, Ln_error) \ -{ \ - __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ -} + { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifndef __PYX_EXTERN_C #ifdef __cplusplus @@ -809,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_tracer.pyx", "stringsource", "src/hunter/_tracer.pxd", - ".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", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_event.pxd", "src/hunter/_predicates.pxd", }; @@ -826,6 +827,17 @@ 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; +struct __pyx_opt_args_6hunter_6_event_5Event_detach; + +/* "_event.pxd":37 + * + * Event clone(self) + * Event detach(self, value_filter=?) # <<<<<<<<<<<<<< + */ +struct __pyx_opt_args_6hunter_6_event_5Event_detach { + int __pyx_n; + PyObject *value_filter; +}; /* "_event.pxd":11 * @@ -1004,6 +1016,7 @@ struct __pyx_obj_6hunter_7_tracer_Tracer { struct __pyx_vtabstruct_6hunter_6_event_Event { struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); + struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; @@ -1563,6 +1576,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr #endif +/* PyObjectGetAttrStrNoError.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); + /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); @@ -1906,6 +1922,9 @@ static int __pyx_f_6hunter_7_tracer_trace_func(struct __pyx_obj_6hunter_7_tracer PyObject *__pyx_t_21 = NULL; PyObject *__pyx_t_22 = NULL; PyObject *__pyx_t_23 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace_func", 0); __Pyx_TraceCall("trace_func", __pyx_f[0], 24, 0, __PYX_ERR(0, 24, __pyx_L1_error)); @@ -2440,6 +2459,9 @@ static int __pyx_f_6hunter_7_tracer_trace_func(struct __pyx_obj_6hunter_7_tracer static int __pyx_pw_6hunter_7_tracer_6Tracer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_6hunter_7_tracer_6Tracer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_threading_support = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); @@ -2496,6 +2518,9 @@ static int __pyx_pf_6hunter_7_tracer_6Tracer___cinit__(struct __pyx_obj_6hunter_ int __pyx_r; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); __Pyx_TraceCall("__cinit__", __pyx_f[0], 52, 0, __PYX_ERR(0, 52, __pyx_L1_error)); @@ -2632,6 +2657,9 @@ static void __pyx_pf_6hunter_7_tracer_6Tracer_2__dealloc__(struct __pyx_obj_6hun PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); __Pyx_TraceCall("__dealloc__", __pyx_f[0], 61, 0, __PYX_ERR(0, 61, __pyx_L1_error)); @@ -2745,6 +2773,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_4__repr__(struct __pyx_obj_6h PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); __Pyx_TraceCall("__repr__", __pyx_f[0], 66, 0, __PYX_ERR(0, 66, __pyx_L1_error)); @@ -2931,6 +2962,9 @@ static PyObject *__pyx_pw_6hunter_7_tracer_6Tracer_7__call__(PyObject *__pyx_v_s PyObject *__pyx_v_frame = 0; PyObject *__pyx_v_kind = 0; PyObject *__pyx_v_arg = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); @@ -3005,6 +3039,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_6__call__(struct __pyx_obj_6h int __pyx_t_2; int __pyx_t_3; int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); __Pyx_TraceCall("__call__", __pyx_f[0], 76, 0, __PYX_ERR(0, 76, __pyx_L1_error)); @@ -3119,6 +3156,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_8trace(struct __pyx_obj_6hunt PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_tracefunc __pyx_t_7; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace", 0); __Pyx_TraceCall("trace", __pyx_f[0], 82, 0, __PYX_ERR(0, 82, __pyx_L1_error)); @@ -3375,6 +3415,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_10stop(struct __pyx_obj_6hunt PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("stop", 0); __Pyx_TraceCall("stop", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error)); @@ -3595,6 +3638,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_12__enter__(struct __pyx_obj_ PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__enter__", 0); __Pyx_TraceCall("__enter__", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error)); @@ -3643,6 +3689,9 @@ static PyObject *__pyx_pw_6hunter_7_tracer_6Tracer_15__exit__(PyObject *__pyx_v_ CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_val = 0; CYTHON_UNUSED PyObject *__pyx_v_exc_tb = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); @@ -3716,6 +3765,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_14__exit__(struct __pyx_obj_6 PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); __Pyx_TraceCall("__exit__", __pyx_f[0], 112, 0, __PYX_ERR(0, 112, __pyx_L1_error)); @@ -3792,6 +3844,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_7handler___get__(struct __pyx PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[2], 30, 0, __PYX_ERR(2, 30, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -3835,6 +3890,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_8previous___get__(struct __py PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[2], 31, 0, __PYX_ERR(2, 31, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -3878,6 +3936,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_17threading_support___get__(s PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[2], 32, 0, __PYX_ERR(2, 32, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -3922,6 +3983,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_5depth___get__(struct __pyx_o __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[2], 33, 0, __PYX_ERR(2, 33, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -3969,6 +4033,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_5calls___get__(struct __pyx_o __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[2], 34, 0, __PYX_ERR(2, 34, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -4014,6 +4081,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_19_threading_previous___get__ PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_TraceCall("__get__", __pyx_f[2], 38, 0, __PYX_ERR(2, 38, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); @@ -4056,6 +4126,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_16__reduce_cython__(CYTHON_UN __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error)); @@ -4114,6 +4187,9 @@ static PyObject *__pyx_pf_6hunter_7_tracer_6Tracer_18__setstate_cython__(CYTHON_ __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error)); @@ -4532,6 +4608,9 @@ static int __Pyx_modinit_function_export_code(void) { static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_t_1 = PyImport_ImportModule("types"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) @@ -4563,6 +4642,9 @@ static int __Pyx_modinit_type_init_code(void) { static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) @@ -4628,6 +4710,9 @@ static int __Pyx_modinit_variable_import_code(void) { static int __Pyx_modinit_function_import_code(void) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __pyx_t_1 = PyImport_ImportModule("hunter._predicates"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) @@ -4642,17 +4727,19 @@ static int __Pyx_modinit_function_import_code(void) { } -#if PY_MAJOR_VERSION < 3 -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC void -#else +#ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#elif PY_MAJOR_VERSION < 3 +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void #endif #else -#ifdef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyObject * +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif @@ -4735,6 +4822,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec__tracer(PyObject *__pyx_pyinit_mod { __Pyx_TraceDeclarations PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { @@ -4823,17 +4913,17 @@ if (!__Pyx_RefNanny) { } #endif /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(); (void)__Pyx_modinit_variable_export_code(); (void)__Pyx_modinit_function_export_code(); - if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; - if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(); - if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; + if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) @@ -5757,7 +5847,7 @@ static int __Pyx_ParseOptionalKeywords( } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 - if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + if (likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { @@ -5784,7 +5874,7 @@ static int __Pyx_ParseOptionalKeywords( while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -5800,7 +5890,7 @@ static int __Pyx_ParseOptionalKeywords( while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; @@ -6427,6 +6517,28 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj } #endif +/* PyObjectGetAttrStrNoError */ +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; @@ -6454,43 +6566,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { PyObject *setstate = NULL; PyObject *setstate_cython = NULL; #if CYTHON_USE_PYTYPE_LOOKUP - if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #else - if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; #endif #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; #endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { - reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + goto __PYX_BAD; + } setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { - setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + goto __PYX_BAD; + } } PyType_Modified((PyTypeObject*)type_obj); } } - goto GOOD; -BAD: + goto __PYX_GOOD; +__PYX_BAD: if (!PyErr_Occurred()) PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); ret = -1; -GOOD: +__PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); @@ -6553,7 +6673,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { { #if PY_MAJOR_VERSION >= 3 if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); if (!module) { @@ -6590,7 +6710,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { /* CLineInTraceback */ #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON @@ -6694,7 +6814,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } From d1ef8beb30b32515715c8386f01ba5439509c1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 24 May 2020 17:30:06 +0300 Subject: [PATCH 27/38] Upgrade cython. --- tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tox.ini b/tox.ini index f3d20b0..cb17678 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,7 @@ deps = pytest-random-order colorama==0.4.3 cover: pytest-cov - {cython,cover}: cython==0.29.14 + {cython,cover}: cython==0.29.19 manhole==1.6.0 process-tests setuptools-scm @@ -78,7 +78,7 @@ commands = [testenv:cythonize] basepython = {env:TOXPYTHON:python} deps = - cython==0.29.14 + cython==0.29.19 skip_install = true commands = {posargs:python setup.py clean --all build_ext --force} @@ -107,7 +107,7 @@ commands = [testenv:codecov] deps = codecov - cython==0.29.14 + cython==0.29.19 skip_install = true setenv = PYTHONPATH={toxinidir}/src @@ -117,7 +117,7 @@ commands = [testenv:report] deps = coverage - cython==0.29.14 + cython==0.29.19 skip_install = true setenv = PYTHONPATH={toxinidir}/src @@ -130,5 +130,5 @@ commands = coverage erase skip_install = true deps = coverage - cython==0.29.14 + cython==0.29.19 From a2bdb6afdf80eab5f2746ecb66276eaaee408ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 24 May 2020 18:06:46 +0300 Subject: [PATCH 28/38] Make sure right types are used in more situations. --- src/hunter/__init__.py | 1 + src/hunter/_event.c | 1250 ++++++++++++++++------------------ src/hunter/_event.pyx | 5 - src/hunter/_predicates.c | 1319 +++++++++++++++++++++++------------- src/hunter/_predicates.pxd | 16 +- src/hunter/_predicates.pyx | 34 +- src/hunter/_tracer.c | 6 +- src/hunter/predicates.py | 8 +- 8 files changed, 1466 insertions(+), 1173 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 87b80b1..29b9288 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -33,6 +33,7 @@ except ImportError: from .event import Event # noqa 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 183fd78..a0303a5 100644 --- a/src/hunter/_event.c +++ b/src/hunter/_event.c @@ -886,7 +886,7 @@ struct __pyx_obj_6hunter_6_event_Event { }; -/* "hunter/_event.pyx":311 +/* "hunter/_event.pyx":306 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -2075,7 +2075,6 @@ static PyObject *__pyx_n_s_util; 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, PyObject *__pyx_v_depth, PyObject *__pyx_v_calls, PyObject *__pyx_v_threading_support); /* proto */ -static PyObject *__pyx_pf_6hunter_6_event_5Event_2make_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 */ @@ -2089,7 +2088,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_2__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 */ @@ -2097,8 +2096,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_4__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_6__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*/ @@ -3632,7 +3631,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl * event._thread = self._thread * return event # <<<<<<<<<<<<<< * - * def make_fake_event(self): + * @property */ __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -3662,103 +3661,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl return __pyx_r; } -/* "hunter/_event.pyx":133 - * return event - * - * def make_fake_event(self): # <<<<<<<<<<<<<< - * self._locals = {} - * self._globals = {} - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_3make_fake_event(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_3make_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_2make_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_2make_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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("make_fake_event", 0); - __Pyx_TraceCall("make_fake_event", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error)); - - /* "hunter/_event.pyx":134 - * - * def make_fake_event(self): - * self._locals = {} # <<<<<<<<<<<<<< - * self._globals = {} - * self.detached = True - */ - __Pyx_TraceLine(134,0,__PYX_ERR(0, 134, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __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":135 - * def make_fake_event(self): - * self._locals = {} - * self._globals = {} # <<<<<<<<<<<<<< - * self.detached = True - * - */ - __Pyx_TraceLine(135,0,__PYX_ERR(0, 135, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __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":136 - * self._locals = {} - * self._globals = {} - * self.detached = True # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_TraceLine(136,0,__PYX_ERR(0, 136, __pyx_L1_error)) - __pyx_v_self->detached = 1; - - /* "hunter/_event.pyx":133 - * return event - * - * 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":139 +/* "hunter/_event.pyx":134 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -3795,39 +3698,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 139, 0, __PYX_ERR(0, 139, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 134, 0, __PYX_ERR(0, 134, __pyx_L1_error)); - /* "hunter/_event.pyx":142 + /* "hunter/_event.pyx":137 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< * current = PyThread_get_thread_ident() * main = get_main_thread() */ - __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __pyx_L1_error)) + __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __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":143 + /* "hunter/_event.pyx":138 * * 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(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) + __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) __pyx_v_current = PyThread_get_thread_ident(); - /* "hunter/_event.pyx":144 + /* "hunter/_event.pyx":139 * 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(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -3841,20 +3744,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, 144, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __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":145 + /* "hunter/_event.pyx":140 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< * self._threadidn = None * else: */ - __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __pyx_L1_error)) + __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_main != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { @@ -3862,34 +3765,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, 145, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __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, 145, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main, __pyx_n_s_ident); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __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, 145, __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, 140, __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, 145, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 140, __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":146 + /* "hunter/_event.pyx":141 * main = get_main_thread() * if main is not None and current == main.ident: * self._threadidn = None # <<<<<<<<<<<<<< * else: * self._threadidn = current */ - __Pyx_TraceLine(146,0,__PYX_ERR(0, 146, __pyx_L1_error)) + __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __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":145 + /* "hunter/_event.pyx":140 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< @@ -3899,16 +3802,16 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ goto __pyx_L4; } - /* "hunter/_event.pyx":148 + /* "hunter/_event.pyx":143 * self._threadidn = None * else: * self._threadidn = current # <<<<<<<<<<<<<< * return self._threadidn * */ - __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) + __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 148, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_threadidn); @@ -3918,7 +3821,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ } __pyx_L4:; - /* "hunter/_event.pyx":142 + /* "hunter/_event.pyx":137 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< @@ -3927,20 +3830,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":149 + /* "hunter/_event.pyx":144 * else: * self._threadidn = current * return self._threadidn # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) + __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __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":139 + /* "hunter/_event.pyx":134 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -3963,7 +3866,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":152 +/* "hunter/_event.pyx":147 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -3997,41 +3900,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 152, 0, __PYX_ERR(0, 152, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 147, 0, __PYX_ERR(0, 147, __pyx_L1_error)); - /* "hunter/_event.pyx":153 + /* "hunter/_event.pyx":148 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< * if self._thread is UNSET: * self._thread = current_thread() */ - __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __pyx_L1_error)) + __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __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":154 + /* "hunter/_event.pyx":149 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< * self._thread = current_thread() * self._threadname = self._thread.name */ - __Pyx_TraceLine(154,0,__PYX_ERR(0, 154, __pyx_L1_error)) + __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __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":155 + /* "hunter/_event.pyx":150 * if self._threadname is UNSET: * if self._thread is UNSET: * self._thread = current_thread() # <<<<<<<<<<<<<< * self._threadname = self._thread.name * return self._threadname */ - __Pyx_TraceLine(155,0,__PYX_ERR(0, 155, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -4045,7 +3948,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, 155, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -4054,7 +3957,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":154 + /* "hunter/_event.pyx":149 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< @@ -4063,15 +3966,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":156 + /* "hunter/_event.pyx":151 * if self._thread is UNSET: * self._thread = current_thread() * self._threadname = self._thread.name # <<<<<<<<<<<<<< * return self._threadname * */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __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, 156, __pyx_L1_error) + __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __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, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_threadname); @@ -4079,7 +3982,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":153 + /* "hunter/_event.pyx":148 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< @@ -4088,20 +3991,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":157 + /* "hunter/_event.pyx":152 * self._thread = current_thread() * self._threadname = self._thread.name * return self._threadname # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) + __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __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":152 + /* "hunter/_event.pyx":147 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -4123,7 +4026,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":160 +/* "hunter/_event.pyx":155 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -4155,41 +4058,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 160, 0, __PYX_ERR(0, 160, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 155, 0, __PYX_ERR(0, 155, __pyx_L1_error)); - /* "hunter/_event.pyx":161 + /* "hunter/_event.pyx":156 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals */ - __Pyx_TraceLine(161,0,__PYX_ERR(0, 161, __pyx_L1_error)) + __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __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":162 + /* "hunter/_event.pyx":157 * def locals(self): * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) # <<<<<<<<<<<<<< * self._locals = self.frame.f_locals * return self._locals */ - __Pyx_TraceLine(162,0,__PYX_ERR(0, 162, __pyx_L1_error)) + __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __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":163 + /* "hunter/_event.pyx":158 * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals # <<<<<<<<<<<<<< * return self._locals * */ - __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error)) + __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_locals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4198,7 +4101,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":161 + /* "hunter/_event.pyx":156 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< @@ -4207,20 +4110,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":164 + /* "hunter/_event.pyx":159 * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals * return self._locals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) + __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __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":160 + /* "hunter/_event.pyx":155 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -4240,7 +4143,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":167 +/* "hunter/_event.pyx":162 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -4272,28 +4175,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 167, 0, __PYX_ERR(0, 167, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 162, 0, __PYX_ERR(0, 162, __pyx_L1_error)); - /* "hunter/_event.pyx":168 + /* "hunter/_event.pyx":163 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< * self._globals = self.frame.f_globals * return self._globals */ - __Pyx_TraceLine(168,0,__PYX_ERR(0, 168, __pyx_L1_error)) + __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __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":169 + /* "hunter/_event.pyx":164 * def globals(self): * if self._globals is UNSET: * self._globals = self.frame.f_globals # <<<<<<<<<<<<<< * return self._globals * */ - __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) + __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_globals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4302,7 +4205,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":168 + /* "hunter/_event.pyx":163 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< @@ -4311,20 +4214,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o */ } - /* "hunter/_event.pyx":170 + /* "hunter/_event.pyx":165 * if self._globals is UNSET: * self._globals = self.frame.f_globals * return self._globals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __pyx_L1_error)) + __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __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":167 + /* "hunter/_event.pyx":162 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -4344,7 +4247,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o return __pyx_r; } -/* "hunter/_event.pyx":173 +/* "hunter/_event.pyx":168 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4376,29 +4279,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 173, 0, __PYX_ERR(0, 173, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 168, 0, __PYX_ERR(0, 168, __pyx_L1_error)); - /* "hunter/_event.pyx":174 + /* "hunter/_event.pyx":169 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< * self._function = self.frame.f_code.co_name * return self._function */ - __Pyx_TraceLine(174,0,__PYX_ERR(0, 174, __pyx_L1_error)) + __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __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":175 + /* "hunter/_event.pyx":170 * def function(self): * if self._function is UNSET: * self._function = self.frame.f_code.co_name # <<<<<<<<<<<<<< * return self._function * */ - __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __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, 175, __pyx_L1_error) + __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __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, 170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_function); @@ -4406,7 +4309,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":174 + /* "hunter/_event.pyx":169 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< @@ -4415,20 +4318,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":176 + /* "hunter/_event.pyx":171 * if self._function is UNSET: * self._function = self.frame.f_code.co_name * return self._function # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __pyx_L1_error)) + __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __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":173 + /* "hunter/_event.pyx":168 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4448,7 +4351,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":179 +/* "hunter/_event.pyx":174 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -4494,61 +4397,61 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 179, 0, __PYX_ERR(0, 179, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 174, 0, __PYX_ERR(0, 174, __pyx_L1_error)); - /* "hunter/_event.pyx":180 + /* "hunter/_event.pyx":175 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< * code = self.code * if code.co_name is None: */ - __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __pyx_L1_error)) + __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __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":181 + /* "hunter/_event.pyx":176 * def function_object(self): * if self._function_object is UNSET: * code = self.code # <<<<<<<<<<<<<< * if code.co_name is None: * return None */ - __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __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, 181, __pyx_L1_error) + __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __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, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_code = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":182 + /* "hunter/_event.pyx":177 * 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(182,0,__PYX_ERR(0, 182, __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, 182, __pyx_L1_error) + __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __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, 177, __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":183 + /* "hunter/_event.pyx":178 * 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(183,0,__PYX_ERR(0, 183, __pyx_L1_error)) + __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "hunter/_event.pyx":182 + /* "hunter/_event.pyx":177 * if self._function_object is UNSET: * code = self.code * if code.co_name is None: # <<<<<<<<<<<<<< @@ -4557,20 +4460,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":185 + /* "hunter/_event.pyx":180 * 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(185,0,__PYX_ERR(0, 185, __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, 185, __pyx_L1_error) + __Pyx_TraceLine(180,0,__PYX_ERR(0, 180, __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, 180, __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, 185, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __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, 185, __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, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -4587,7 +4490,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, 185, __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, 180, __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; @@ -4596,14 +4499,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, 185, __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, 180, __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, 185, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 180, __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; @@ -4614,7 +4517,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, 185, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -4622,15 +4525,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":186 + /* "hunter/_event.pyx":181 * # 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(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4647,7 +4550,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, 186, __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, 181, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4655,13 +4558,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, 186, __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, 181, __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, 186, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __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; @@ -4672,7 +4575,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, 186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -4680,14 +4583,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":191 + /* "hunter/_event.pyx":186 * # 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(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) + __Pyx_TraceLine(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_func == Py_None); __pyx_t_9 = (__pyx_t_2 != 0); if (__pyx_t_9) { @@ -4695,32 +4598,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, 191, __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, 186, __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, 191, __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, 186, __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, 191, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 186, __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":192 + /* "hunter/_event.pyx":187 * # 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(192,0,__PYX_ERR(0, 192, __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, 192, __pyx_L1_error) + __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __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, 187, __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, 192, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 187, __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, 192, __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, 187, __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, 192, __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, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4736,21 +4639,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, 192, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 187, __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":193 + /* "hunter/_event.pyx":188 * 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(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4767,7 +4670,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, 193, __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, 188, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -4775,13 +4678,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, 193, __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, 188, __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, 193, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 188, __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; @@ -4792,7 +4695,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, 193, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -4800,7 +4703,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":191 + /* "hunter/_event.pyx":186 * # 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: # <<<<<<<<<<<<<< @@ -4809,34 +4712,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":196 + /* "hunter/_event.pyx":191 * # 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(196,0,__PYX_ERR(0, 196, __pyx_L1_error)) + __Pyx_TraceLine(191,0,__PYX_ERR(0, 191, __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":197 + /* "hunter/_event.pyx":192 * # 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(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) + __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __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, 197, __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, 192, __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, 197, __pyx_L1_error) + __PYX_ERR(0, 192, __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, 197, __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, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); @@ -4845,34 +4748,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, 197, __pyx_L1_error) + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":198 + /* "hunter/_event.pyx":193 * 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(198,0,__PYX_ERR(0, 198, __pyx_L1_error)) + __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __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":199 + /* "hunter/_event.pyx":194 * 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(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) + __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) goto __pyx_L9_continue; - /* "hunter/_event.pyx":198 + /* "hunter/_event.pyx":193 * if func is None: * for v in self.globals.values(): * if not isinstance(v, type): # <<<<<<<<<<<<<< @@ -4881,15 +4784,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":200 + /* "hunter/_event.pyx":195 * if not isinstance(v, type): * continue * func = get_func_in_mro(v, code) # <<<<<<<<<<<<<< * if func is not None: * break */ - __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_12 = 0; @@ -4906,7 +4809,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, 200, __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, 195, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4914,13 +4817,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, 200, __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, 195, __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, 200, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 195, __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; @@ -4931,7 +4834,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, 200, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -4939,29 +4842,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":201 + /* "hunter/_event.pyx":196 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< * break * self._function_object = func */ - __Pyx_TraceLine(201,0,__PYX_ERR(0, 201, __pyx_L1_error)) + __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __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":202 + /* "hunter/_event.pyx":197 * func = get_func_in_mro(v, code) * if func is not None: * break # <<<<<<<<<<<<<< * self._function_object = func * return self._function_object */ - __Pyx_TraceLine(202,0,__PYX_ERR(0, 202, __pyx_L1_error)) + __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) goto __pyx_L10_break; - /* "hunter/_event.pyx":201 + /* "hunter/_event.pyx":196 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< @@ -4974,7 +4877,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":196 + /* "hunter/_event.pyx":191 * # 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: # <<<<<<<<<<<<<< @@ -4983,21 +4886,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":203 + /* "hunter/_event.pyx":198 * if func is not None: * break * self._function_object = func # <<<<<<<<<<<<<< * return self._function_object * */ - __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error)) + __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __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":180 + /* "hunter/_event.pyx":175 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< @@ -5006,20 +4909,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":204 + /* "hunter/_event.pyx":199 * break * self._function_object = func * return self._function_object # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __pyx_L1_error)) + __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __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":179 + /* "hunter/_event.pyx":174 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -5048,7 +4951,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc return __pyx_r; } -/* "hunter/_event.pyx":207 +/* "hunter/_event.pyx":202 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -5082,60 +4985,60 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 207, 0, __PYX_ERR(0, 207, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 202, 0, __PYX_ERR(0, 202, __pyx_L1_error)); - /* "hunter/_event.pyx":208 + /* "hunter/_event.pyx":203 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< * module = self.frame.f_globals.get('__name__', '') * if module is None: */ - __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error)) + __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __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":209 + /* "hunter/_event.pyx":204 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __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, 209, __pyx_L1_error) + __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __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, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __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":210 + /* "hunter/_event.pyx":205 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< * module = '' * */ - __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __pyx_L1_error)) + __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __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":211 + /* "hunter/_event.pyx":206 * module = self.frame.f_globals.get('__name__', '') * if module is None: * module = '' # <<<<<<<<<<<<<< * * self._module = module */ - __Pyx_TraceLine(211,0,__PYX_ERR(0, 211, __pyx_L1_error)) + __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s__5); __Pyx_DECREF_SET(__pyx_v_module, __pyx_kp_s__5); - /* "hunter/_event.pyx":210 + /* "hunter/_event.pyx":205 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< @@ -5144,21 +5047,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":213 + /* "hunter/_event.pyx":208 * module = '' * * self._module = module # <<<<<<<<<<<<<< * return self._module * */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) + __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __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":208 + /* "hunter/_event.pyx":203 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< @@ -5167,20 +5070,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":214 + /* "hunter/_event.pyx":209 * * self._module = module * return self._module # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) + __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __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":207 + /* "hunter/_event.pyx":202 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -5202,7 +5105,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":217 +/* "hunter/_event.pyx":212 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5243,54 +5146,54 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 217, 0, __PYX_ERR(0, 217, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error)); - /* "hunter/_event.pyx":218 + /* "hunter/_event.pyx":213 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< * filename = self.frame.f_code.co_filename * if not filename: */ - __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) + __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __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":219 + /* "hunter/_event.pyx":214 * 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(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) + __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __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":220 + /* "hunter/_event.pyx":215 * 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(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) + __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 215, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":221 + /* "hunter/_event.pyx":216 * filename = self.frame.f_code.co_filename * if not filename: * filename = self.frame.f_globals.get('__file__') # <<<<<<<<<<<<<< * if not filename: * filename = '' */ - __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __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, 221, __pyx_L1_error) + __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __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, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5304,13 +5207,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, 221, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __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":220 + /* "hunter/_event.pyx":215 * if self._filename is UNSET: * filename = self.frame.f_code.co_filename * if not filename: # <<<<<<<<<<<<<< @@ -5319,30 +5222,30 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":222 + /* "hunter/_event.pyx":217 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< * filename = '' * elif filename.endswith(('.pyc', '.pyo')): */ - __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 217, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":223 + /* "hunter/_event.pyx":218 * filename = self.frame.f_globals.get('__file__') * if not filename: * filename = '' # <<<<<<<<<<<<<< * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) + __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s__5); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_kp_s__5); - /* "hunter/_event.pyx":222 + /* "hunter/_event.pyx":217 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< @@ -5352,15 +5255,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":224 + /* "hunter/_event.pyx":219 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5374,27 +5277,27 @@ 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_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, 224, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __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, 224, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":220 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __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, 225, __pyx_L1_error) + __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __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, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":224 + /* "hunter/_event.pyx":219 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< @@ -5404,15 +5307,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":226 + /* "hunter/_event.pyx":221 * 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(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5426,24 +5329,24 @@ 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_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, 226, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __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, 226, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":227 + /* "hunter/_event.pyx":222 * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) # <<<<<<<<<<<<<< * for ext in ('.pyx', '.py'): * cyfilename = basename + ext */ - __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) + __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __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, 227, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5461,7 +5364,7 @@ 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__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, 227, __pyx_L1_error) + __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, 222, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -5469,13 +5372,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { 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, 227, __pyx_L1_error) + __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, 222, __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, 227, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __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; @@ -5486,7 +5389,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ __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, 227, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -5494,48 +5397,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":228 + /* "hunter/_event.pyx":223 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __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, 228, __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, 223, __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, 228, __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, 223, __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":229 + /* "hunter/_event.pyx":224 * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): * cyfilename = basename + ext # <<<<<<<<<<<<<< * if exists(cyfilename): * filename = cyfilename */ - __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) - __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) + __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_cyfilename, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":230 + /* "hunter/_event.pyx":225 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< * filename = cyfilename * break */ - __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 230, __pyx_L1_error) + __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -5549,35 +5452,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, 230, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __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, 230, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":231 + /* "hunter/_event.pyx":226 * cyfilename = basename + ext * if exists(cyfilename): * filename = cyfilename # <<<<<<<<<<<<<< * break * */ - __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __pyx_L1_error)) + __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_cyfilename); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_v_cyfilename); - /* "hunter/_event.pyx":232 + /* "hunter/_event.pyx":227 * if exists(cyfilename): * filename = cyfilename * break # <<<<<<<<<<<<<< * * self._filename = filename */ - __Pyx_TraceLine(232,0,__PYX_ERR(0, 232, __pyx_L1_error)) + __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) goto __pyx_L7_break; - /* "hunter/_event.pyx":230 + /* "hunter/_event.pyx":225 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< @@ -5586,19 +5489,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":228 + /* "hunter/_event.pyx":223 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) } __pyx_L7_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":226 + /* "hunter/_event.pyx":221 * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -5608,21 +5511,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } __pyx_L5:; - /* "hunter/_event.pyx":234 + /* "hunter/_event.pyx":229 * break * * self._filename = filename # <<<<<<<<<<<<<< * return self._filename * */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) + __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __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":218 + /* "hunter/_event.pyx":213 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< @@ -5631,20 +5534,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":235 + /* "hunter/_event.pyx":230 * * self._filename = filename * return self._filename # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) + __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __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":217 + /* "hunter/_event.pyx":212 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5671,7 +5574,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":238 +/* "hunter/_event.pyx":233 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5703,29 +5606,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 238, 0, __PYX_ERR(0, 238, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 233, 0, __PYX_ERR(0, 233, __pyx_L1_error)); - /* "hunter/_event.pyx":239 + /* "hunter/_event.pyx":234 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< * self._lineno = self.frame.f_lineno * return self._lineno */ - __Pyx_TraceLine(239,0,__PYX_ERR(0, 239, __pyx_L1_error)) + __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __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":240 + /* "hunter/_event.pyx":235 * def lineno(self): * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno # <<<<<<<<<<<<<< * return self._lineno * */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) + __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_lineno); @@ -5733,7 +5636,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":239 + /* "hunter/_event.pyx":234 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< @@ -5742,20 +5645,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":241 + /* "hunter/_event.pyx":236 * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno * return self._lineno # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L1_error)) + __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __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":238 + /* "hunter/_event.pyx":233 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5775,7 +5678,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":244 +/* "hunter/_event.pyx":239 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5806,34 +5709,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 244, 0, __PYX_ERR(0, 244, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __pyx_L1_error)); - /* "hunter/_event.pyx":245 + /* "hunter/_event.pyx":240 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< * return self.frame.f_code * else: */ - __Pyx_TraceLine(245,0,__PYX_ERR(0, 245, __pyx_L1_error)) + __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __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":246 + /* "hunter/_event.pyx":241 * def code(self): * if self._code is UNSET: * return self.frame.f_code # <<<<<<<<<<<<<< * else: * return self._code */ - __Pyx_TraceLine(246,0,__PYX_ERR(0, 246, __pyx_L1_error)) + __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __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":245 + /* "hunter/_event.pyx":240 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< @@ -5842,14 +5745,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ */ } - /* "hunter/_event.pyx":248 + /* "hunter/_event.pyx":243 * return self.frame.f_code * else: * return self._code # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __pyx_L1_error)) + __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_code); @@ -5857,7 +5760,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ goto __pyx_L0; } - /* "hunter/_event.pyx":244 + /* "hunter/_event.pyx":239 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5876,7 +5779,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_event.pyx":251 +/* "hunter/_event.pyx":246 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -5912,31 +5815,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 251, 0, __PYX_ERR(0, 251, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 246, 0, __PYX_ERR(0, 246, __pyx_L1_error)); - /* "hunter/_event.pyx":252 + /* "hunter/_event.pyx":247 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: */ - __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __pyx_L1_error)) + __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __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":253 + /* "hunter/_event.pyx":248 * 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(253,0,__PYX_ERR(0, 253, __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, 253, __pyx_L1_error) + __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __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, 248, __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, 253, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 248, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5951,39 +5854,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __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, 253, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __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":254 + /* "hunter/_event.pyx":249 * 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(254,0,__PYX_ERR(0, 254, __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, 254, __pyx_L1_error) + __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __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, 249, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":256 + /* "hunter/_event.pyx":251 * 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(256,0,__PYX_ERR(0, 256, __pyx_L1_error)) + __Pyx_TraceLine(251,0,__PYX_ERR(0, 251, __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":254 + /* "hunter/_event.pyx":249 * if self._stdlib is UNSET: * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: # <<<<<<<<<<<<<< @@ -5993,26 +5896,26 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":257 + /* "hunter/_event.pyx":252 * # 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(257,0,__PYX_ERR(0, 257, __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, 257, __pyx_L1_error) + __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __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, 252, __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, 257, __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, 252, __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, 257, __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, 252, __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, 257, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -6027,39 +5930,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, 257, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __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, 257, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 252, __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, 257, __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, 252, __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, 257, __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, 252, __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":259 + /* "hunter/_event.pyx":254 * 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(259,0,__PYX_ERR(0, 259, __pyx_L1_error)) + __Pyx_TraceLine(254,0,__PYX_ERR(0, 254, __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":257 + /* "hunter/_event.pyx":252 * # skip this over-vendored module * self._stdlib = True * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): # <<<<<<<<<<<<<< @@ -6069,20 +5972,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":260 + /* "hunter/_event.pyx":255 * # 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(260,0,__PYX_ERR(0, 260, __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, 260, __pyx_L1_error) + __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __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, 255, __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, 260, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __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, 260, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -6097,28 +6000,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, 260, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 255, __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, 260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":262 + /* "hunter/_event.pyx":257 * 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(262,0,__PYX_ERR(0, 262, __pyx_L1_error)) + __Pyx_TraceLine(257,0,__PYX_ERR(0, 257, __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":260 + /* "hunter/_event.pyx":255 * # skip namedtuple exec garbage * self._stdlib = True * elif self.filename.startswith(SITE_PACKAGES_PATHS): # <<<<<<<<<<<<<< @@ -6128,20 +6031,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":263 + /* "hunter/_event.pyx":258 * # 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(263,0,__PYX_ERR(0, 263, __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, 263, __pyx_L1_error) + __Pyx_TraceLine(258,0,__PYX_ERR(0, 258, __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, 258, __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, 263, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 258, __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, 263, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -6156,28 +6059,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, 263, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 258, __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, 263, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 258, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":264 + /* "hunter/_event.pyx":259 * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): * self._stdlib = True # <<<<<<<<<<<<<< * else: * self._stdlib = False */ - __Pyx_TraceLine(264,0,__PYX_ERR(0, 264, __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":263 + /* "hunter/_event.pyx":258 * # if it's in site-packages then its definitely not stdlib * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): # <<<<<<<<<<<<<< @@ -6187,14 +6090,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":266 + /* "hunter/_event.pyx":261 * self._stdlib = True * else: * self._stdlib = False # <<<<<<<<<<<<<< * return self._stdlib * */ - __Pyx_TraceLine(266,0,__PYX_ERR(0, 266, __pyx_L1_error)) + __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); @@ -6204,7 +6107,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __pyx_L4:; - /* "hunter/_event.pyx":252 + /* "hunter/_event.pyx":247 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< @@ -6213,20 +6116,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":267 + /* "hunter/_event.pyx":262 * else: * self._stdlib = False * return self._stdlib # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(267,0,__PYX_ERR(0, 267, __pyx_L1_error)) + __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __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":251 + /* "hunter/_event.pyx":246 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -6250,7 +6153,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":270 +/* "hunter/_event.pyx":265 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -6313,28 +6216,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 270, 0, __PYX_ERR(0, 270, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 265, 0, __PYX_ERR(0, 265, __pyx_L1_error)); - /* "hunter/_event.pyx":273 + /* "hunter/_event.pyx":268 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< * try: * self._fullsource = None */ - __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L1_error)) + __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __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":274 + /* "hunter/_event.pyx":269 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< * self._fullsource = None * */ - __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L1_error)) + __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6344,64 +6247,64 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "hunter/_event.pyx":275 + /* "hunter/_event.pyx":270 * if self._fullsource is UNSET: * try: * self._fullsource = None # <<<<<<<<<<<<<< * * if self.kind == 'call' and self.frame.f_code.co_name != "": */ - __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L4_error)) + __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __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":277 + /* "hunter/_event.pyx":272 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< * lines = [] * try: */ - __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __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, 277, __pyx_L4_error) + __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __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, 272, __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, 277, __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, 272, __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, 277, __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, 272, __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":278 + /* "hunter/_event.pyx":273 * * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] # <<<<<<<<<<<<<< * try: * for _, token, _, _, line in generate_tokens(partial( */ - __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L4_error)) - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 278, __pyx_L4_error) + __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L4_error)) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_lines = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "hunter/_event.pyx":279 + /* "hunter/_event.pyx":274 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< * for _, token, _, _, line in generate_tokens(partial( * next, */ - __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __pyx_L4_error)) + __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6411,45 +6314,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "hunter/_event.pyx":280 + /* "hunter/_event.pyx":275 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 280, __pyx_L13_error) + __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 275, __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, 280, __pyx_L13_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 275, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_13); - /* "hunter/_event.pyx":281 + /* "hunter/_event.pyx":276 * try: * for _, token, _, _, line in generate_tokens(partial( * next, # <<<<<<<<<<<<<< * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): */ - __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L13_error)) - __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 281, __pyx_L13_error) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L13_error)) + __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 276, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_14); - /* "hunter/_event.pyx":282 + /* "hunter/_event.pyx":277 * 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(282,0,__PYX_ERR(0, 282, __pyx_L13_error)) - __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 282, __pyx_L13_error) + __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __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, 282, __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, 277, __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, 282, __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, 277, __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, 282, __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, 277, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; @@ -6467,7 +6370,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, 282, __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, 277, __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; @@ -6477,7 +6380,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, 282, __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, 277, __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; @@ -6485,7 +6388,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, 282, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(4+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 277, __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; @@ -6502,7 +6405,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, 282, __pyx_L13_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 277, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6522,7 +6425,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, 280, __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, 275, __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; @@ -6532,7 +6435,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, 280, __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, 275, __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; @@ -6540,7 +6443,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, 280, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 275, __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; @@ -6551,7 +6454,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, 280, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_21, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 275, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6569,25 +6472,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, 280, __pyx_L13_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 275, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":280 + /* "hunter/_event.pyx":275 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) + __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __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, 280, __pyx_L13_error) + __pyx_t_22 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 275, __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, 280, __pyx_L13_error) + __pyx_t_23 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 275, __pyx_L13_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -6595,17 +6498,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, 280, __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, 275, __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, 280, __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, 275, __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, 280, __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, 275, __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, 280, __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, 275, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -6615,7 +6518,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, 280, __pyx_L13_error) + else __PYX_ERR(0, 275, __pyx_L13_error) } break; } @@ -6627,7 +6530,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, 280, __pyx_L13_error) + __PYX_ERR(0, 275, __pyx_L13_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6653,7 +6556,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, 280, __pyx_L13_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 275, __pyx_L13_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -6663,7 +6566,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, 280, __pyx_L13_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 275, __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; @@ -6672,7 +6575,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, 280, __pyx_L13_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_16), 5) < 0) __PYX_ERR(0, 275, __pyx_L13_error) __pyx_t_24 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L22_unpacking_done; @@ -6680,7 +6583,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, 280, __pyx_L13_error) + __PYX_ERR(0, 275, __pyx_L13_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); @@ -6694,44 +6597,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":284 + /* "hunter/_event.pyx":279 * 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(284,0,__PYX_ERR(0, 284, __pyx_L13_error)) + __Pyx_TraceLine(279,0,__PYX_ERR(0, 279, __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, 284, __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, 279, __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, 284, __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, 279, __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, 284, __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, 279, __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":285 + /* "hunter/_event.pyx":280 * )): * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) # <<<<<<<<<<<<<< * break * except TokenError: */ - __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L13_error)) - __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L13_error) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) + __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_fullsource); @@ -6739,17 +6642,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":286 + /* "hunter/_event.pyx":281 * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) * break # <<<<<<<<<<<<<< * except TokenError: * pass */ - __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L13_error)) + __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L13_error)) goto __pyx_L20_break; - /* "hunter/_event.pyx":284 + /* "hunter/_event.pyx":279 * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): * if token in ("def", "class", "lambda"): # <<<<<<<<<<<<<< @@ -6758,19 +6661,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":280 + /* "hunter/_event.pyx":275 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) + __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L13_error)) } __pyx_L20_break:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":279 + /* "hunter/_event.pyx":274 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6795,16 +6698,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":287 + /* "hunter/_event.pyx":282 * self._fullsource = ''.join(lines) * break * except TokenError: # <<<<<<<<<<<<<< * pass * if self._fullsource is None: */ - __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L15_except_error)) + __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __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, 287, __pyx_L15_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_TokenError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 282, __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; @@ -6817,7 +6720,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":279 + /* "hunter/_event.pyx":274 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6837,7 +6740,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L18_try_end:; } - /* "hunter/_event.pyx":277 + /* "hunter/_event.pyx":272 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< @@ -6846,31 +6749,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":289 + /* "hunter/_event.pyx":284 * 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(289,0,__PYX_ERR(0, 289, __pyx_L4_error)) + __Pyx_TraceLine(284,0,__PYX_ERR(0, 284, __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":290 + /* "hunter/_event.pyx":285 * 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(290,0,__PYX_ERR(0, 290, __pyx_L4_error)) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 290, __pyx_L4_error) + __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __pyx_L4_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __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, 290, __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, 285, __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, 290, __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, 285, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_21 = NULL; __pyx_t_20 = 0; @@ -6887,7 +6790,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, 290, __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, 285, __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; @@ -6897,7 +6800,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, 290, __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, 285, __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; @@ -6905,7 +6808,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, 290, __pyx_L4_error) + __pyx_t_13 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 285, __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; @@ -6919,7 +6822,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, 290, __pyx_L4_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 285, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -6930,7 +6833,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":289 + /* "hunter/_event.pyx":284 * except TokenError: * pass * if self._fullsource is None: # <<<<<<<<<<<<<< @@ -6939,7 +6842,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":274 + /* "hunter/_event.pyx":269 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -6964,18 +6867,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":291 + /* "hunter/_event.pyx":286 * 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(291,0,__PYX_ERR(0, 291, __pyx_L6_except_error)) + __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __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, 291, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 286, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_13); @@ -6983,15 +6886,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_v_exc = __pyx_t_7; /*try:*/ { - /* "hunter/_event.pyx":292 + /* "hunter/_event.pyx":287 * 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(292,0,__PYX_ERR(0, 292, __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, 292, __pyx_L33_error) + __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __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, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_21 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -7005,7 +6908,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, 292, __pyx_L33_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 287, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GIVEREF(__pyx_t_15); @@ -7015,14 +6918,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_t_15 = 0; } - /* "hunter/_event.pyx":291 + /* "hunter/_event.pyx":286 * 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(291,0,__PYX_ERR(0, 291, __pyx_L33_error)) + __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L33_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7079,7 +6982,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":274 + /* "hunter/_event.pyx":269 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -7099,7 +7002,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L9_try_end:; } - /* "hunter/_event.pyx":273 + /* "hunter/_event.pyx":268 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< @@ -7108,20 +7011,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":293 + /* "hunter/_event.pyx":288 * except Exception as exc: * self._fullsource = "??? NO SOURCE: {!r}".format(exc) * return self._fullsource # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __pyx_L1_error)) + __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __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":270 + /* "hunter/_event.pyx":265 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -7156,7 +7059,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":296 +/* "hunter/_event.pyx":291 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7208,31 +7111,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 296, 0, __PYX_ERR(0, 296, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 291, 0, __PYX_ERR(0, 291, __pyx_L1_error)); - /* "hunter/_event.pyx":297 + /* "hunter/_event.pyx":292 * @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(297,0,__PYX_ERR(0, 297, __pyx_L1_error)) + __Pyx_TraceLine(292,0,__PYX_ERR(0, 292, __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":298 + /* "hunter/_event.pyx":293 * 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(298,0,__PYX_ERR(0, 298, __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, 298, __pyx_L1_error) + __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __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, 293, __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, 298, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -7247,28 +7150,28 @@ 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_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, 298, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __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, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":299 + /* "hunter/_event.pyx":294 * 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(299,0,__PYX_ERR(0, 299, __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, 299, __pyx_L1_error) + __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __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, 294, __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, 299, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_splitext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 294, __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, 299, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_basename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __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, 299, __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, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -7283,7 +7186,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, 299, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -7299,10 +7202,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, 299, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 294, __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, 299, __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, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -7318,7 +7221,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, 299, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -7327,7 +7230,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":298 + /* "hunter/_event.pyx":293 * def source(self): * if self._source is UNSET: * if self.filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -7336,14 +7239,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":300 + /* "hunter/_event.pyx":295 * 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(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) + __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -7353,19 +7256,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "hunter/_event.pyx":301 + /* "hunter/_event.pyx":296 * 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(301,0,__PYX_ERR(0, 301, __pyx_L5_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 301, __pyx_L5_error) + __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L5_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __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, 301, __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, 296, __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, 301, __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, 296, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_14 = 0; @@ -7382,7 +7285,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, 301, __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, 296, __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; @@ -7392,7 +7295,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, 301, __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, 296, __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; @@ -7400,7 +7303,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, 301, __pyx_L5_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 296, __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; @@ -7414,7 +7317,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, 301, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -7425,7 +7328,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":300 + /* "hunter/_event.pyx":295 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7447,18 +7350,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":302 + /* "hunter/_event.pyx":297 * 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(302,0,__PYX_ERR(0, 302, __pyx_L7_except_error)) + __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __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, 302, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 297, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); @@ -7466,15 +7369,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_v_exc = __pyx_t_5; /*try:*/ { - /* "hunter/_event.pyx":303 + /* "hunter/_event.pyx":298 * 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(303,0,__PYX_ERR(0, 303, __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, 303, __pyx_L16_error) + __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __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, 298, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -7488,7 +7391,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, 303, __pyx_L16_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -7498,14 +7401,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_4 = 0; } - /* "hunter/_event.pyx":302 + /* "hunter/_event.pyx":297 * 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(302,0,__PYX_ERR(0, 302, __pyx_L16_error)) + __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L16_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7559,7 +7462,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":300 + /* "hunter/_event.pyx":295 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7579,7 +7482,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_L10_try_end:; } - /* "hunter/_event.pyx":297 + /* "hunter/_event.pyx":292 * @property * def source(self): * if self._source is UNSET: # <<<<<<<<<<<<<< @@ -7588,20 +7491,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":305 + /* "hunter/_event.pyx":300 * self._source = "??? NO SOURCE: {!r}".format(exc) * * return self._source # <<<<<<<<<<<<<< * * def __getitem__(self, item): */ - __Pyx_TraceLine(305,0,__PYX_ERR(0, 305, __pyx_L1_error)) + __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __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":296 + /* "hunter/_event.pyx":291 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7629,7 +7532,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":307 +/* "hunter/_event.pyx":302 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7638,19 +7541,19 @@ 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_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_3__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_2__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_2__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -7659,24 +7562,24 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4__getitem__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error)); + __Pyx_TraceCall("__getitem__", __pyx_f[0], 302, 0, __PYX_ERR(0, 302, __pyx_L1_error)); - /* "hunter/_event.pyx":308 + /* "hunter/_event.pyx":303 * * def __getitem__(self, item): * return getattr(self, item) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) + __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __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, 308, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_event.pyx":307 + /* "hunter/_event.pyx":302 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -8041,19 +7944,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_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_5__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_4__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_4__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; @@ -8476,19 +8379,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_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_7__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_6__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_6__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 @@ -8532,7 +8435,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":311 +/* "hunter/_event.pyx":306 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -8585,19 +8488,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, 311, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 1); __PYX_ERR(0, 306, __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, 311, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 2); __PYX_ERR(0, 306, __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, 311, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 3); __PYX_ERR(0, 306, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -8607,7 +8510,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, 311, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "yield_lines") < 0)) __PYX_ERR(0, 306, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8629,13 +8532,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, 311, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 306, __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, 311, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_collector), (&PyList_Type), 1, "collector", 1))) __PYX_ERR(0, 306, __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 */ @@ -8659,7 +8562,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, 311, __pyx_L1_error) + __PYX_ERR(0, 306, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8679,7 +8582,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__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, 311, __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, 306, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8717,7 +8620,7 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("yield_lines", 0); __Pyx_TraceFrameInit(__pyx_codeobj__12) - __Pyx_TraceCall("yield_lines", __pyx_f[0], 311, 0, __PYX_ERR(0, 311, __pyx_L1_error)); + __Pyx_TraceCall("yield_lines", __pyx_f[0], 306, 0, __PYX_ERR(0, 306, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; @@ -8727,39 +8630,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, 311, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 306, __pyx_L1_error) - /* "hunter/_event.pyx":313 + /* "hunter/_event.pyx":308 * 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(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) + __Pyx_TraceLine(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_dedent = Py_None; - /* "hunter/_event.pyx":314 + /* "hunter/_event.pyx":309 * limit=10): * dedent = None * amount = 0 # <<<<<<<<<<<<<< * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: */ - __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error)) + __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_amount = 0; - /* "hunter/_event.pyx":315 + /* "hunter/_event.pyx":310 * 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(315,0,__PYX_ERR(0, 315, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8776,7 +8679,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, 315, __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, 310, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8784,13 +8687,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, 315, __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, 310, __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, 315, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __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; @@ -8801,14 +8704,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, 315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __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, 315, __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, 310, __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, 315, __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, 310, __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; @@ -8816,9 +8719,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, 315, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __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, 315, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 310, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -8826,17 +8729,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, 315, __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, 310, __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, 315, __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, 310, __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, 315, __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, 310, __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, 315, __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, 310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -8846,7 +8749,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, 315, __pyx_L1_error) + else __PYX_ERR(0, 310, __pyx_L1_error) } break; } @@ -8857,29 +8760,29 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":316 + /* "hunter/_event.pyx":311 * 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(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) + __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __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":317 + /* "hunter/_event.pyx":312 * 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(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __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, 317, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -8894,7 +8797,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, 317, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 312, __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); @@ -8902,17 +8805,17 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":318 + /* "hunter/_event.pyx":313 * 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(318,0,__PYX_ERR(0, 318, __pyx_L1_error)) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 318, __pyx_L1_error) + __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 313, __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, 318, __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, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -8925,18 +8828,18 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":319 + /* "hunter/_event.pyx":314 * dedent = LEADING_WHITESPACE_RE.findall(line) * dedent = dedent[0] if dedent else "" * amount = len(dedent) # <<<<<<<<<<<<<< * elif not line.startswith(dedent): * break */ - __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __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, 319, __pyx_L1_error) + __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __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, 314, __pyx_L1_error) __pyx_cur_scope->__pyx_v_amount = __pyx_t_10; - /* "hunter/_event.pyx":316 + /* "hunter/_event.pyx":311 * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: # <<<<<<<<<<<<<< @@ -8946,15 +8849,15 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py goto __pyx_L6; } - /* "hunter/_event.pyx":320 + /* "hunter/_event.pyx":315 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< * break * collector.append(line) */ - __Pyx_TraceLine(320,0,__PYX_ERR(0, 320, __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, 320, __pyx_L1_error) + __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __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, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -8968,25 +8871,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, 320, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __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, 320, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 315, __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":321 + /* "hunter/_event.pyx":316 * amount = len(dedent) * elif not line.startswith(dedent): * break # <<<<<<<<<<<<<< * collector.append(line) * yield line[amount:] */ - __Pyx_TraceLine(321,0,__PYX_ERR(0, 321, __pyx_L1_error)) + __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) goto __pyx_L5_break; - /* "hunter/_event.pyx":320 + /* "hunter/_event.pyx":315 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< @@ -8996,26 +8899,26 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py } __pyx_L6:; - /* "hunter/_event.pyx":322 + /* "hunter/_event.pyx":317 * elif not line.startswith(dedent): * break * collector.append(line) # <<<<<<<<<<<<<< * yield line[amount:] */ - __Pyx_TraceLine(322,0,__PYX_ERR(0, 322, __pyx_L1_error)) + __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __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, 322, __pyx_L1_error) + __PYX_ERR(0, 317, __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, 322, __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, 317, __pyx_L1_error) - /* "hunter/_event.pyx":323 + /* "hunter/_event.pyx":318 * break * collector.append(line) * yield line[amount:] # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(323,0,__PYX_ERR(0, 323, __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, 323, __pyx_L1_error) + __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __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, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -9036,22 +8939,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, 323, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 318, __pyx_L1_error) - /* "hunter/_event.pyx":315 + /* "hunter/_event.pyx":310 * 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(315,0,__PYX_ERR(0, 315, __pyx_L1_error)) + __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __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":311 + /* "hunter/_event.pyx":306 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -9956,9 +9859,8 @@ static PyObject *__pyx_getprop_6hunter_6_event_5Event_detached(PyObject *o, CYTH } static PyMethodDef __pyx_methods_6hunter_6_event_Event[] = { - {"make_fake_event", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_3make_fake_event, METH_NOARGS, 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}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_7__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; @@ -10001,7 +9903,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_3__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; @@ -10401,58 +10303,58 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "hunter/_event.pyx":209 + /* "hunter/_event.pyx":204 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 209, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "hunter/_event.pyx":224 + /* "hunter/_event.pyx":219 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":220 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __pyx_slice__8 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_slice__8 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8); - /* "hunter/_event.pyx":226 + /* "hunter/_event.pyx":221 * 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__9 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "hunter/_event.pyx":228 + /* "hunter/_event.pyx":223 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 228, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); @@ -10467,17 +10369,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "hunter/_event.pyx":311 + /* "hunter/_event.pyx":306 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __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, 311, __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, 306, __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, 311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 311, __pyx_L1_error) + __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, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 306, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -10560,7 +10462,7 @@ static int __Pyx_modinit_type_init_code(void) { 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, 311, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines) < 0) __PYX_ERR(0, 306, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines.tp_print = 0; #endif @@ -11261,17 +11163,17 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) - /* "hunter/_event.pyx":311 + /* "hunter/_event.pyx":306 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __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, 311, __pyx_L1_error) + __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __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, 306, __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, 311, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yield_lines, __pyx_t_1) < 0) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":1 diff --git a/src/hunter/_event.pyx b/src/hunter/_event.pyx index 7ff7800..6898726 100644 --- a/src/hunter/_event.pyx +++ b/src/hunter/_event.pyx @@ -130,11 +130,6 @@ cdef class Event: event._thread = self._thread return event - 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 53759d1..b85173d 100644 --- a/src/hunter/_predicates.c +++ b/src/hunter/_predicates.c @@ -1003,15 +1003,15 @@ struct __pyx_obj_6hunter_11_predicates_From { * @cython.final * cdef class Backlog: # <<<<<<<<<<<<<< * cdef: - * object condition + * readonly object condition */ struct __pyx_obj_6hunter_11_predicates_Backlog { PyObject_HEAD PyObject *condition; int size; int stack; - PyBoolObject *vars; - PyBoolObject *strip; + int vars; + int strip; PyObject *action; PyObject *_filter; PyObject *queue; @@ -2341,7 +2341,6 @@ 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__"; @@ -2485,7 +2484,6 @@ 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; @@ -2617,6 +2615,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(struct __p 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_9condition___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* 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 */ @@ -12550,14 +12556,8 @@ static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hu * 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; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_strip); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_v_self->strip = __pyx_t_7; /* "hunter/_predicates.pyx":408 * self.stack = stack @@ -12567,14 +12567,8 @@ static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hu * */ __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; + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_vars); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_v_self->vars = __pyx_t_7; /* "hunter/_predicates.pyx":409 * self.strip = strip @@ -12750,6 +12744,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_o PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -12778,26 +12773,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_o __Pyx_GOTREF(__pyx_t_1); __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_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->condition); __Pyx_GIVEREF(__pyx_v_self->condition); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condition); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 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)); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); __Pyx_INCREF(__pyx_v_self->action); __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_4, 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); + PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->_filter); __pyx_t_1 = 0; __pyx_t_2 = 0; + __pyx_t_3 = 0; /* "hunter/_predicates.pyx":415 * @@ -12807,11 +12804,11 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_o * ) */ __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; + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Backlog_s_size_s_stack_s_vars_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __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":414 @@ -12827,6 +12824,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_o __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("hunter._predicates.Backlog.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -12864,6 +12862,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -12892,26 +12891,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_ __Pyx_GOTREF(__pyx_t_1); __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_t_3 = PyTuple_New(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self->condition); __Pyx_GIVEREF(__pyx_v_self->condition); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condition); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 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)); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); __Pyx_INCREF(__pyx_v_self->action); __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_4, 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); + PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->_filter); __pyx_t_1 = 0; __pyx_t_2 = 0; + __pyx_t_3 = 0; /* "hunter/_predicates.pyx":420 * @@ -12921,11 +12922,11 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_ * ) */ __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; + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_hunter_predicates_Backlog_condi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __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":419 @@ -12941,6 +12942,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("hunter._predicates.Backlog.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -13075,14 +13077,13 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_ob * ) */ __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) + __pyx_t_2 = (__pyx_v_self->vars == ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->vars); if (__pyx_t_2) { - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __Pyx_INCREF(__pyx_t_3); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } @@ -13152,7 +13153,8 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - Py_hash_t __pyx_t_4; + PyObject *__pyx_t_4 = NULL; + Py_hash_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -13171,32 +13173,34 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx __Pyx_GOTREF(__pyx_t_1); __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_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_s_Backlog); __Pyx_GIVEREF(__pyx_n_s_Backlog); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Backlog); + PyTuple_SET_ITEM(__pyx_t_4, 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); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->condition); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 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)); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_3); __Pyx_INCREF(__pyx_v_self->action); __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_4, 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); + PyTuple_SET_ITEM(__pyx_t_4, 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; + __pyx_t_3 = 0; + __pyx_t_5 = PyObject_Hash(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 435, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; goto __pyx_L0; /* "hunter/_predicates.pyx":434 @@ -13212,6 +13216,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("hunter._predicates.Backlog.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -13437,7 +13442,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(struct __p __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) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); 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_vars, __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_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) @@ -13787,7 +13795,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_22filter(struct __pyx_o __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) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); 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_vars, __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_action, __pyx_v_self->action) < 0) __PYX_ERR(0, 460, __pyx_L1_error) /* "hunter/_predicates.pyx":461 @@ -13843,6 +13854,390 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_22filter(struct __pyx_o return __pyx_r; } +/* "hunter/_predicates.pxd":54 + * cdef class Backlog: + * cdef: + * readonly object condition # <<<<<<<<<<<<<< + * readonly int size + * readonly int stack + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9condition_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9condition_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_9condition___get__(((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_9condition___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 54, 0, __PYX_ERR(1, 54, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->condition); + __pyx_r = __pyx_v_self->condition; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Backlog.condition.__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; +} + +/* "hunter/_predicates.pxd":55 + * cdef: + * readonly object condition + * readonly int size # <<<<<<<<<<<<<< + * readonly int stack + * readonly bint vars + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(((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_4size___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.size.__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; +} + +/* "hunter/_predicates.pxd":56 + * readonly object condition + * readonly int size + * readonly int stack # <<<<<<<<<<<<<< + * readonly bint vars + * readonly bint strip + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(((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_5stack___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 56, 0, __PYX_ERR(1, 56, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.stack.__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; +} + +/* "hunter/_predicates.pxd":57 + * readonly int size + * readonly int stack + * readonly bint vars # <<<<<<<<<<<<<< + * readonly bint strip + * readonly object action + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4vars_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4vars_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(((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_4vars___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 57, 0, __PYX_ERR(1, 57, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.vars.__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; +} + +/* "hunter/_predicates.pxd":58 + * readonly int stack + * readonly bint vars + * readonly bint strip # <<<<<<<<<<<<<< + * readonly object action + * readonly object _filter + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5strip_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5strip_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(((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_5strip___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 58, 0, __PYX_ERR(1, 58, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.strip.__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; +} + +/* "hunter/_predicates.pxd":59 + * readonly bint vars + * readonly bint strip + * readonly object action # <<<<<<<<<<<<<< + * readonly object _filter + * readonly object queue + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_6action_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_6action_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(((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_6action___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->action); + __pyx_r = __pyx_v_self->action; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Backlog.action.__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; +} + +/* "hunter/_predicates.pxd":60 + * readonly bint strip + * readonly object action + * readonly object _filter # <<<<<<<<<<<<<< + * readonly object queue + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(((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_7_filter___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 60, 0, __PYX_ERR(1, 60, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_r = __pyx_v_self->_filter; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Backlog._filter.__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; +} + +/* "hunter/_predicates.pxd":61 + * readonly object action + * readonly object _filter + * readonly object queue # <<<<<<<<<<<<<< + * + * cdef fast_And_call(And self, Event event) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(((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_5queue___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 61, 0, __PYX_ERR(1, 61, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->queue); + __pyx_r = __pyx_v_self->queue; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Backlog.queue.__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 @@ -13872,9 +14267,11 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -13893,34 +14290,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str __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_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->_filter); __Pyx_GIVEREF(__pyx_v_self->_filter); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_5, 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); + PyTuple_SET_ITEM(__pyx_t_5, 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); + PyTuple_SET_ITEM(__pyx_t_5, 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); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_self->queue); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 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)); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_v_state = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; /* "(tree fragment)":6 * cdef bint use_setstate @@ -13930,10 +14331,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str * 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; + __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__dict = __pyx_t_5; + __pyx_t_5 = 0; /* "(tree fragment)":7 * state = (self._filter, self.action, self.condition, self.queue, self.size, self.stack, self.strip, self.vars) @@ -13943,9 +14344,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str * 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) { + __pyx_t_6 = (__pyx_v__dict != Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) @@ -13955,23 +14356,23 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str * 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_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 8, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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._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 + * 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 */ __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) __pyx_v_use_setstate = 1; @@ -13989,68 +14390,54 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str /* "(tree fragment)":11 * use_setstate = True * else: - * 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 # <<<<<<<<<<<<<< + * 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 # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state */ __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) /*else*/ { - __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) { + __pyx_t_6 = (__pyx_v_self->_filter != Py_None); + __pyx_t_8 = (__pyx_t_6 != 0); + if (!__pyx_t_8) { } else { - __pyx_t_5 = __pyx_t_4; + __pyx_t_7 = __pyx_t_8; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__pyx_v_self->condition != Py_None); - __pyx_t_6 = (__pyx_t_4 != 0); + __pyx_t_8 = (__pyx_v_self->action != Py_None); + __pyx_t_6 = (__pyx_t_8 != 0); if (!__pyx_t_6) { } else { - __pyx_t_5 = __pyx_t_6; + __pyx_t_7 = __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) { + __pyx_t_6 = (__pyx_v_self->condition != Py_None); + __pyx_t_8 = (__pyx_t_6 != 0); + if (!__pyx_t_8) { } else { - __pyx_t_5 = __pyx_t_4; + __pyx_t_7 = __pyx_t_8; 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_t_8 = (__pyx_v_self->queue != Py_None); + __pyx_t_6 = (__pyx_t_8 != 0); + __pyx_t_7 = __pyx_t_6; __pyx_L4_bool_binop_done:; - __pyx_v_use_setstate = __pyx_t_5; + __pyx_v_use_setstate = __pyx_t_7; } __pyx_L3:; /* "(tree fragment)":12 * else: - * 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 + * 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 * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state * else: */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_5 = (__pyx_v_use_setstate != 0); - if (__pyx_t_5) { + __pyx_t_7 = (__pyx_v_use_setstate != 0); + if (__pyx_t_7) { /* "(tree fragment)":13 - * 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 + * 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 * if use_setstate: * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state # <<<<<<<<<<<<<< * else: @@ -14058,37 +14445,37 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str */ __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_5, 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); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_61357180); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_2 = 0; + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); + __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; __pyx_t_3 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: - * 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 + * 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 * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state * else: @@ -14105,29 +14492,29 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __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_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_5, 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); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_61357180); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 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_3); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); - __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; } @@ -14142,6 +14529,8 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_24__reduce_cython__(str __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("hunter._predicates.Backlog.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -14220,23 +14609,23 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_26__setstate_cython__(s * ) * * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< - * cdef object result - * cdef Event first_event + * cdef bint first_is_call + * cdef Event detached_event */ 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; + int __pyx_v_first_is_call; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_detached_event = 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; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_stack_event = 0; + PyFrameObject *__pyx_v_first_frame = 0; + PyFrameObject *__pyx_v_frame = 0; int __pyx_v_backlog_call_depth; - int __pyx_v_missing_depth; int __pyx_v_depth_delta; + int __pyx_v_first_depth; + int __pyx_v_missing_depth; + PyObject *__pyx_v_result = 0; PyObject *__pyx_v_stack_events = 0; - struct __pyx_obj_6hunter_6_event_Event *__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 @@ -14247,66 +14636,67 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s PyObject *__pyx_t_4 = NULL; int __pyx_t_5; long __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + long __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); - int __pyx_t_11; - struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_12; - int __pyx_t_13; + PyObject *__pyx_t_11 = NULL; + int __pyx_t_12; + struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_13; + int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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":477 - * cdef FrameType first_frame + /* "hunter/_predicates.pyx":478 + * cdef object stack_events * * result = fast_call(self.condition, event) # <<<<<<<<<<<<<< * if result: * if self.queue: */ - __Pyx_TraceLine(477,0,__PYX_ERR(0, 477, __pyx_L1_error)) + __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __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_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 478, __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":478 + /* "hunter/_predicates.pyx":479 * * 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) + __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 479, __pyx_L1_error) if (__pyx_t_3) { - /* "hunter/_predicates.pyx":479 + /* "hunter/_predicates.pyx":480 * result = fast_call(self.condition, event) * if result: * if self.queue: # <<<<<<<<<<<<<< * self.action.cleanup() * */ - __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) + __Pyx_TraceLine(480,0,__PYX_ERR(0, 480, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->queue); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 480, __pyx_L1_error) if (__pyx_t_3) { - /* "hunter/_predicates.pyx":480 + /* "hunter/_predicates.pyx":481 * if result: * if self.queue: * self.action.cleanup() # <<<<<<<<<<<<<< * * first_event = self.queue[0] */ - __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_TraceLine(481,0,__PYX_ERR(0, 481, __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, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -14320,57 +14710,42 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __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 + /* "hunter/_predicates.pyx":483 * 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_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, 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); + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_v_first_event = ((struct __pyx_obj_6hunter_6_event_Event *)__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)) + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid */ __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_event = self.queue[0] * first_depth = first_event.depth * backlog_call_depth = event.depth - first_depth # <<<<<<<<<<<<<< + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid * 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); @@ -14378,94 +14753,75 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s /* "hunter/_predicates.pyx":486 * first_depth = first_event.depth * backlog_call_depth = event.depth - first_depth + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid # <<<<<<<<<<<<<< + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: + */ + __Pyx_TraceLine(486,0,__PYX_ERR(0, 486, __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, 486, __pyx_L1_error) + __pyx_v_first_is_call = __pyx_t_3; + + /* "hunter/_predicates.pyx":487 + * backlog_call_depth = event.depth - first_depth + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid * 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_TraceLine(487,0,__PYX_ERR(0, 487, __pyx_L1_error)) + __pyx_t_5 = ((__pyx_v_self->stack - __pyx_v_backlog_call_depth) + __pyx_v_first_is_call); __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; + if (((__pyx_t_5 > __pyx_t_6) != 0)) { + __pyx_t_7 = __pyx_t_5; } 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_t_7 = __pyx_t_6; } - __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_6 = __pyx_t_7; __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; + if (((__pyx_t_6 < __pyx_t_5) != 0)) { + __pyx_t_7 = __pyx_t_6; } 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_t_7 = __pyx_t_5; } - __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; + __pyx_v_missing_depth = __pyx_t_7; - /* "hunter/_predicates.pyx":487 - * backlog_call_depth = event.depth - first_depth + /* "hunter/_predicates.pyx":488 + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid * 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_TraceLine(488,0,__PYX_ERR(0, 488, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_missing_depth != 0); if (__pyx_t_3) { - /* "hunter/_predicates.pyx":488 + /* "hunter/_predicates.pyx":489 * 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) + __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_first_is_call != 0); if (__pyx_t_3) { - /* "hunter/_predicates.pyx":489 + /* "hunter/_predicates.pyx":490 * 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_TraceLine(490,0,__PYX_ERR(0, 490, __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, 490, __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) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_7_tracer_FrameType))))) __PYX_ERR(0, 490, __pyx_L1_error) __pyx_v_first_frame = ((PyFrameObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":488 + /* "hunter/_predicates.pyx":489 * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) * if missing_depth: * if first_is_call: # <<<<<<<<<<<<<< @@ -14475,14 +14831,14 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s goto __pyx_L6; } - /* "hunter/_predicates.pyx":491 + /* "hunter/_predicates.pyx":492 * first_frame = first_event.frame.f_back * else: * first_frame = first_event.frame # <<<<<<<<<<<<<< - * if first_frame: - * stack_events = deque() + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full */ - __Pyx_TraceLine(491,0,__PYX_ERR(0, 491, __pyx_L1_error)) + __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error)) /*else*/ { __pyx_t_2 = ((PyObject *)__pyx_v_first_event->frame); __Pyx_INCREF(__pyx_t_2); @@ -14491,26 +14847,27 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_L6:; - /* "hunter/_predicates.pyx":492 + /* "hunter/_predicates.pyx":493 * else: * first_frame = first_event.frame - * if first_frame: # <<<<<<<<<<<<<< - * stack_events = deque() - * depth_delta = 0 + * if first_frame is not None: # <<<<<<<<<<<<<< + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame */ - __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) { + __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error)) + __pyx_t_3 = (((PyObject *)__pyx_v_first_frame) != Py_None); + __pyx_t_8 = (__pyx_t_3 != 0); + if (__pyx_t_8) { - /* "hunter/_predicates.pyx":493 + /* "hunter/_predicates.pyx":494 * first_frame = first_event.frame - * if first_frame: - * stack_events = deque() # <<<<<<<<<<<<<< + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full # <<<<<<<<<<<<<< + * frame = first_frame * 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_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -14524,55 +14881,55 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __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 + /* "hunter/_predicates.pyx":495 + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame # <<<<<<<<<<<<<< + * depth_delta = 0 + * while frame and depth_delta < missing_depth: */ - __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) - __pyx_v_depth_delta = 0; + __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + __Pyx_INCREF(((PyObject *)__pyx_v_first_frame)); + __pyx_v_frame = __pyx_v_first_frame; /* "hunter/_predicates.pyx":496 - * depth_delta = 0 - * - * frame = first_frame # <<<<<<<<<<<<<< - * while first_frame and depth_delta < missing_depth: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame + * depth_delta = 0 # <<<<<<<<<<<<<< + * while 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; + __pyx_v_depth_delta = 0; /* "hunter/_predicates.pyx":497 - * * frame = first_frame - * while first_frame and depth_delta < missing_depth: # <<<<<<<<<<<<<< + * depth_delta = 0 + * while 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) { + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) + if (__pyx_t_3) { } else { - __pyx_t_3 = __pyx_t_8; + __pyx_t_8 = __pyx_t_3; 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_t_3 = ((__pyx_v_depth_delta < __pyx_v_missing_depth) != 0); + __pyx_t_8 = __pyx_t_3; __pyx_L10_bool_binop_done:; - if (!__pyx_t_3) break; + if (!__pyx_t_8) break; /* "hunter/_predicates.pyx":499 - * while first_frame and depth_delta < missing_depth: + * while frame and depth_delta < missing_depth: * stack_event = Event( * frame=frame, kind='call', arg=None, # <<<<<<<<<<<<<< * threading_support=event.threading_support, @@ -14613,8 +14970,8 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s 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: + * depth_delta = 0 + * while frame and depth_delta < missing_depth: * stack_event = Event( # <<<<<<<<<<<<<< * frame=frame, kind='call', arg=None, * threading_support=event.threading_support, @@ -14623,7 +14980,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __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_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_1)); __pyx_t_1 = 0; /* "hunter/_predicates.pyx":503 @@ -14631,58 +14988,72 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * ) * if not self.vars: # <<<<<<<<<<<<<< * # noinspection PyPropertyAccess - * stack_event.make_fake_event() + * stack_event._locals = {} */ __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); + __pyx_t_8 = ((!(__pyx_v_self->vars != 0)) != 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) - * + * stack_event._locals = {} # <<<<<<<<<<<<<< + * stack_event._globals = {} + * stack_event.detached = True */ __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_t_1 = __Pyx_PyDict_NewPresized(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; + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_stack_event->_locals); + __Pyx_DECREF(__pyx_v_stack_event->_locals); + __pyx_v_stack_event->_locals = __pyx_t_1; + __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":506 + * # noinspection PyPropertyAccess + * stack_event._locals = {} + * stack_event._globals = {} # <<<<<<<<<<<<<< + * stack_event.detached = True + * stack_events.appendleft(stack_event) + */ + __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v_stack_event->_globals); + __Pyx_DECREF(__pyx_v_stack_event->_globals); + __pyx_v_stack_event->_globals = __pyx_t_1; + __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":507 + * stack_event._locals = {} + * stack_event._globals = {} + * stack_event.detached = True # <<<<<<<<<<<<<< + * stack_events.appendleft(stack_event) + * frame = frame.f_back + */ + __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) + __pyx_v_stack_event->detached = 1; /* "hunter/_predicates.pyx":503 * depth=first_depth - depth_delta - 1, calls=-1 * ) * if not self.vars: # <<<<<<<<<<<<<< * # noinspection PyPropertyAccess - * stack_event.make_fake_event() + * stack_event._locals = {} */ } - /* "hunter/_predicates.pyx":506 - * # noinspection PyPropertyAccess - * stack_event.make_fake_event() + /* "hunter/_predicates.pyx":508 + * stack_event._globals = {} + * stack_event.detached = True * stack_events.appendleft(stack_event) # <<<<<<<<<<<<<< - * + * frame = frame.f_back * 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_TraceLine(508,0,__PYX_ERR(0, 508, __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, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -14694,41 +15065,41 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __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_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__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) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __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":508 - * stack_events.appendleft(stack_event) - * - * 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); - /* "hunter/_predicates.pyx":509 - * + * stack_event.detached = True + * stack_events.appendleft(stack_event) + * frame = frame.f_back # <<<<<<<<<<<<<< * depth_delta += 1 - * frame = first_frame.f_back # <<<<<<<<<<<<<< - * * for stack_event in stack_events: */ __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_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_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":510 + * stack_events.appendleft(stack_event) + * frame = frame.f_back + * depth_delta += 1 # <<<<<<<<<<<<<< + * for stack_event in stack_events: + * if self._filter is None: + */ + __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __pyx_L1_error)) + __pyx_v_depth_delta = (__pyx_v_depth_delta + 1); } /* "hunter/_predicates.pyx":511 - * frame = first_frame.f_back - * + * frame = frame.f_back + * depth_delta += 1 * for stack_event in stack_events: # <<<<<<<<<<<<<< * if self._filter is None: * self.action(stack_event) @@ -14773,11 +15144,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __Pyx_GOTREF(__pyx_t_2); } - __Pyx_XDECREF_SET(__pyx_v_stack_event, __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, 511, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2)); __pyx_t_2 = 0; /* "hunter/_predicates.pyx":512 - * + * depth_delta += 1 * for stack_event in stack_events: * if self._filter is None: # <<<<<<<<<<<<<< * self.action(stack_event) @@ -14797,25 +15169,25 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_11 = 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)) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); __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; + __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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 - * + * depth_delta += 1 * for stack_event in stack_events: * if self._filter is None: # <<<<<<<<<<<<<< * self.action(stack_event) @@ -14833,18 +15205,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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; + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_11 = 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)) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); __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; + __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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; @@ -14861,18 +15233,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_11 = 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)) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); __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; + __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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; @@ -14889,8 +15261,8 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_L15:; /* "hunter/_predicates.pyx":511 - * frame = first_frame.f_back - * + * frame = frame.f_back + * depth_delta += 1 * for stack_event in stack_events: # <<<<<<<<<<<<<< * if self._filter is None: * self.action(stack_event) @@ -14899,17 +15271,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":492 + /* "hunter/_predicates.pyx":493 * else: * first_frame = first_event.frame - * if first_frame: # <<<<<<<<<<<<<< - * stack_events = deque() - * depth_delta = 0 + * if first_frame is not None: # <<<<<<<<<<<<<< + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame */ } - /* "hunter/_predicates.pyx":487 - * backlog_call_depth = event.depth - first_depth + /* "hunter/_predicates.pyx":488 + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) * if missing_depth: # <<<<<<<<<<<<<< * if first_is_call: @@ -14988,18 +15360,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_11 = 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)) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); __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; + __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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; @@ -15024,18 +15396,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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; + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_11 = 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)) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); __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; + __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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; @@ -15052,18 +15424,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_11 = 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)) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_11); __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; + __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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; @@ -15117,7 +15489,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":479 + /* "hunter/_predicates.pyx":480 * result = fast_call(self.condition, event) * if result: * if self.queue: # <<<<<<<<<<<<<< @@ -15126,7 +15498,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ } - /* "hunter/_predicates.pyx":478 + /* "hunter/_predicates.pyx":479 * * result = fast_call(self.condition, event) * if result: # <<<<<<<<<<<<<< @@ -15145,7 +15517,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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) + __pyx_t_3 = (__pyx_v_self->strip != 0); if (__pyx_t_3) { } else { __pyx_t_8 = __pyx_t_3; @@ -15201,10 +15573,10 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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) { + __pyx_t_12 = (__pyx_t_3 != 0); + if (!__pyx_t_12) { } else { - __pyx_t_8 = __pyx_t_11; + __pyx_t_8 = __pyx_t_12; goto __pyx_L23_bool_binop_done; } __Pyx_INCREF(__pyx_v_self->_filter); @@ -15223,9 +15595,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s 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_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __pyx_t_11; + __pyx_t_8 = __pyx_t_12; __pyx_L23_bool_binop_done:; if (__pyx_t_8) { @@ -15237,8 +15609,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * self.queue.append(detached_event) */ __Pyx_TraceLine(528,0,__PYX_ERR(0, 528, __pyx_L1_error)) - __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) { + if ((__pyx_v_self->vars != 0)) { __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; @@ -15247,9 +15618,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } - __pyx_t_12.__pyx_n = 1; - __pyx_t_12.value_filter = __pyx_t_1; - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, &__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_13.__pyx_n = 1; + __pyx_t_13.value_filter = __pyx_t_1; + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_detached_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); @@ -15279,7 +15650,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * return result */ __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) - __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((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. @@ -15309,8 +15680,8 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * ) * * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< - * cdef object result - * cdef Event first_event + * cdef bint first_is_call + * cdef Event detached_event */ /* function exit code */ @@ -15318,18 +15689,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_11); __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((PyObject *)__pyx_v_detached_event); - __Pyx_XDECREF((PyObject *)__pyx_v_frame); + __Pyx_XDECREF((PyObject *)__pyx_v_first_event); + __Pyx_XDECREF((PyObject *)__pyx_v_stack_event); __Pyx_XDECREF((PyObject *)__pyx_v_first_frame); - __Pyx_XDECREF(__pyx_v_stack_event); + __Pyx_XDECREF((PyObject *)__pyx_v_frame); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_stack_events); __Pyx_XDECREF(__pyx_v_backlog_event); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); @@ -21689,24 +22059,18 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state } __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->strip); - __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->strip)); - __pyx_v___pyx_result->strip = ((PyBoolObject *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->strip = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(2, 12, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 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(((__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; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->vars = __pyx_t_3; /* "(tree fragment)":13 * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): @@ -24427,8 +24791,6 @@ static PyObject *__pyx_tp_new_6hunter_11_predicates_Backlog(PyTypeObject *t, CYT 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); @@ -24439,8 +24801,6 @@ 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->vars); - Py_CLEAR(p->strip); Py_CLEAR(p->action); Py_CLEAR(p->_filter); Py_CLEAR(p->queue); @@ -24453,12 +24813,6 @@ static int __pyx_tp_traverse_6hunter_11_predicates_Backlog(PyObject *o, visitpro if (p->condition) { e = (*v)(p->condition, 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; } @@ -24477,12 +24831,6 @@ static int __pyx_tp_clear_6hunter_11_predicates_Backlog(PyObject *o) { tmp = ((PyObject*)p->condition); p->condition = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - 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); @@ -24517,6 +24865,38 @@ static PyObject *__pyx_tp_richcompare_6hunter_11_predicates_Backlog(PyObject *o1 } } +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_condition(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_9condition_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_size(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_stack(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_vars(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_4vars_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_strip(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_5strip_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_action(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_6action_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog__filter(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(o); +} + +static PyObject *__pyx_getprop_6hunter_11_predicates_7Backlog_queue(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(o); +} + 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}, @@ -24526,6 +24906,18 @@ static PyMethodDef __pyx_methods_6hunter_11_predicates_Backlog[] = { {0, 0, 0, 0} }; +static struct PyGetSetDef __pyx_getsets_6hunter_11_predicates_Backlog[] = { + {(char *)"condition", __pyx_getprop_6hunter_11_predicates_7Backlog_condition, 0, (char *)0, 0}, + {(char *)"size", __pyx_getprop_6hunter_11_predicates_7Backlog_size, 0, (char *)0, 0}, + {(char *)"stack", __pyx_getprop_6hunter_11_predicates_7Backlog_stack, 0, (char *)0, 0}, + {(char *)"vars", __pyx_getprop_6hunter_11_predicates_7Backlog_vars, 0, (char *)0, 0}, + {(char *)"strip", __pyx_getprop_6hunter_11_predicates_7Backlog_strip, 0, (char *)0, 0}, + {(char *)"action", __pyx_getprop_6hunter_11_predicates_7Backlog_action, 0, (char *)0, 0}, + {(char *)"_filter", __pyx_getprop_6hunter_11_predicates_7Backlog__filter, 0, (char *)0, 0}, + {(char *)"queue", __pyx_getprop_6hunter_11_predicates_7Backlog_queue, 0, (char *)0, 0}, + {0, 0, 0, 0, 0} +}; + static PyNumberMethods __pyx_tp_as_number_Backlog = { 0, /*nb_add*/ 0, /*nb_subtract*/ @@ -24628,7 +25020,7 @@ static PyTypeObject __pyx_type_6hunter_11_predicates_Backlog = { 0, /*tp_iternext*/ __pyx_methods_6hunter_11_predicates_Backlog, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_6hunter_11_predicates_Backlog, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -26309,7 +26701,6 @@ 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}, @@ -27182,8 +27573,8 @@ if (!__Pyx_RefNanny) { * ) * * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< - * cdef object result - * cdef Event first_event + * cdef bint first_is_call + * cdef Event detached_event */ __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error)) diff --git a/src/hunter/_predicates.pxd b/src/hunter/_predicates.pxd index 518dc9d..6bf7c9c 100644 --- a/src/hunter/_predicates.pxd +++ b/src/hunter/_predicates.pxd @@ -51,14 +51,14 @@ cdef class From: @cython.final cdef class Backlog: cdef: - object condition - int size - int stack - bool vars - bool strip - object action - object _filter - object queue + readonly object condition + readonly int size + readonly int stack + readonly bint vars + readonly bint strip + readonly object action + readonly object _filter + readonly 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 6757526..00e2055 100644 --- a/src/hunter/_predicates.pyx +++ b/src/hunter/_predicates.pyx @@ -462,17 +462,18 @@ cdef class Backlog(object): ) cdef inline fast_Backlog_call(Backlog self, Event event): - cdef object result + cdef bint first_is_call + cdef Event detached_event cdef Event first_event - cdef bool first_is_call - cdef int first_depth + cdef Event stack_event + cdef FrameType first_frame + cdef FrameType frame cdef int backlog_call_depth - cdef int missing_depth cdef int depth_delta + cdef int first_depth + cdef int missing_depth + cdef object result cdef object stack_events - cdef Event detached_event - cdef FrameType frame - cdef FrameType first_frame result = fast_call(self.condition, event) if result: @@ -480,21 +481,20 @@ cdef inline fast_Backlog_call(Backlog self, Event event): self.action.cleanup() first_event = self.queue[0] - first_is_call = first_event.kind == 'call' first_depth = first_event.depth backlog_call_depth = event.depth - first_depth + first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid 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: first_frame = first_event.frame - if first_frame: - stack_events = deque() - depth_delta = 0 - + if first_frame is not None: + stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full frame = first_frame - while first_frame and depth_delta < missing_depth: + depth_delta = 0 + while frame and depth_delta < missing_depth: stack_event = Event( frame=frame, kind='call', arg=None, threading_support=event.threading_support, @@ -502,12 +502,12 @@ cdef inline fast_Backlog_call(Backlog self, Event event): ) if not self.vars: # noinspection PyPropertyAccess - stack_event.make_fake_event() + stack_event._locals = {} + stack_event._globals = {} + stack_event.detached = True stack_events.appendleft(stack_event) - + frame = frame.f_back depth_delta += 1 - frame = first_frame.f_back - for stack_event in stack_events: if self._filter is None: self.action(stack_event) diff --git a/src/hunter/_tracer.c b/src/hunter/_tracer.c index 6ffbc1e..0005487 100644 --- a/src/hunter/_tracer.c +++ b/src/hunter/_tracer.c @@ -970,15 +970,15 @@ struct __pyx_obj_6hunter_11_predicates_From { * @cython.final * cdef class Backlog: # <<<<<<<<<<<<<< * cdef: - * object condition + * readonly object condition */ struct __pyx_obj_6hunter_11_predicates_Backlog { PyObject_HEAD PyObject *condition; int size; int stack; - PyBoolObject *vars; - PyBoolObject *strip; + int vars; + int strip; PyObject *action; PyObject *_filter; PyObject *queue; diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index abaa6e8..db93931 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -687,9 +687,11 @@ def __call__(self, event): first_frame = first_event.frame.f_back else: first_frame = first_event.frame - if first_frame: + if first_frame is not None: stack_events = collections.deque() # a new deque because self.queue is limited, we can't add while it's full - for depth_delta, frame in enumerate(islice(frame_iterator(first_frame), missing_depth)): + frame = first_frame + depth_delta = 0 + while frame and depth_delta < missing_depth: stack_event = Event( frame=frame, kind='call', arg=None, threading_support=event.threading_support, @@ -701,6 +703,8 @@ def __call__(self, event): stack_event.globals = {} stack_event.detached = True stack_events.appendleft(stack_event) + frame = frame.f_back + depth_delta += 1 for stack_event in stack_events: if self._filter is None: self.action(stack_event) From 16ab07b9d4e61ab4af3fcca78f6aa9ee27f51ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Sun, 24 May 2020 18:10:57 +0300 Subject: [PATCH 29/38] WIP borken. --- src/hunter/_event.pxd | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hunter/_event.pxd b/src/hunter/_event.pxd index ad3fd71..4b043e5 100644 --- a/src/hunter/_event.pxd +++ b/src/hunter/_event.pxd @@ -33,5 +33,6 @@ cdef class Event: object _threadidn # slightly different name cause "_threadid" is a goddamn macro in Microsoft stddef.h object _threadname + cpdef: Event clone(self) Event detach(self, value_filter=?) From 9fd4dd7664030f62acec0cf2328132f77bcd2da4 Mon Sep 17 00:00:00 2001 From: Ailenei Dan Date: Sun, 24 May 2020 22:21:19 +0300 Subject: [PATCH 30/38] make detach function cpdef and fix cython integration tests --- src/hunter/_event.c | 225 ++++--- src/hunter/_event.pxd | 6 +- src/hunter/_event.pyx | 2 +- src/hunter/_predicates.c | 1200 +++++++++++++++++------------------- src/hunter/_predicates.pyx | 4 +- src/hunter/_tracer.c | 14 +- src/hunter/predicates.py | 4 +- src/hunter/util.py | 15 + tests/test_integration.py | 8 +- 9 files changed, 746 insertions(+), 732 deletions(-) diff --git a/src/hunter/_event.c b/src/hunter/_event.c index a0303a5..fd1cb55 100644 --- a/src/hunter/_event.c +++ b/src/hunter/_event.c @@ -810,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_event.pyx", "src/hunter/_event.pxd", "stringsource", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", + ".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", }; @@ -822,10 +822,10 @@ struct __pyx_obj_6hunter_6_event_Event; struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines; struct __pyx_opt_args_6hunter_6_event_5Event_detach; -/* "hunter/_event.pxd":37 - * +/* "hunter/_event.pxd":38 * Event clone(self) - * Event detach(self, value_filter=?) # <<<<<<<<<<<<<< + * + * cpdef Event detach(self, value_filter=?) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6hunter_6_event_5Event_detach { int __pyx_n; @@ -920,11 +920,11 @@ struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines { struct __pyx_vtabstruct_6hunter_6_event_Event { struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); - struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); + struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *); -static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* --- Runtime support code (head) --- */ /* Refnanny.proto */ @@ -1723,7 +1723,7 @@ static int __Pyx_check_binary_version(void); /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); -static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* proto*/ +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* proto*/ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto*/ /* Module declarations from 'cython' */ @@ -1931,6 +1931,7 @@ static const char __pyx_k_yield_lines[] = "yield_lines"; static const char __pyx_k_if_same_code[] = "if_same_code"; static const char __pyx_k_pyx_checksum[] = "__pyx_checksum"; static const char __pyx_k_stringsource[] = "stringsource"; +static const char __pyx_k_value_filter[] = "value_filter"; static const char __pyx_k_hunter__event[] = "hunter._event"; static const char __pyx_k_pkg_resources[] = "pkg_resources"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; @@ -2072,9 +2073,11 @@ static PyObject *__pyx_n_s_tokenize; static PyObject *__pyx_n_s_tracer; static PyObject *__pyx_n_s_update; 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, 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_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 */ @@ -2088,16 +2091,15 @@ 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_2__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item); /* 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_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 */ static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ 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_4__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_6_event_5Event_6__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_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_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*/ @@ -2678,7 +2680,7 @@ static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_e * self._threadname = UNSET * self._thread = UNSET # <<<<<<<<<<<<<< * - * cdef inline Event detach(self, value_filter=None): + * cpdef inline Event detach(self, value_filter=None): */ __Pyx_TraceLine(74,0,__PYX_ERR(0, 74, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_6hunter_6_event_UNSET); @@ -2715,12 +2717,13 @@ static int __pyx_pf_6hunter_6_event_5Event___init__(struct __pyx_obj_6hunter_6_e /* "hunter/_event.pyx":76 * self._thread = UNSET * - * cdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< + * cpdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * */ -static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args) { +static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args) { PyObject *__pyx_v_value_filter = ((PyObject *)Py_None); struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = NULL; PyObject *__pyx_7genexpr__pyx_v_key = NULL; @@ -2753,7 +2756,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_de /* "hunter/_event.pyx":77 * - * cdef inline Event detach(self, value_filter=None): + * cpdef inline Event detach(self, value_filter=None): * event = Event.__new__(Event) # <<<<<<<<<<<<<< * * event._code = self.code @@ -3256,7 +3259,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_de /* "hunter/_event.pyx":76 * self._thread = UNSET * - * cdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< + * cpdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * */ @@ -3282,6 +3285,97 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_de return __pyx_r; } +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_3detach(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_value_filter = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("detach (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value_filter,0}; + PyObject* values[1] = {0}; + values[0] = ((PyObject *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value_filter); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + 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)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_value_filter = values[0]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_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(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_6hunter_6_event_5Event_2detach(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), __pyx_v_value_filter); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_value_filter) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_2; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("detach", 0); + __Pyx_TraceCall("detach (wrapper)", __pyx_f[0], 76, 0, __PYX_ERR(0, 76, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.value_filter = __pyx_v_value_filter; + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_6hunter_6_event_Event->detach(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._event.Event.detach", __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":109 * return event * @@ -7541,19 +7635,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { +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) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_2__getitem__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_4__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_2__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_4__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -7792,7 +7886,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj * readonly int depth * readonly int calls # <<<<<<<<<<<<<< * readonly bint threading_support - * readonly bint detached + * */ /* Python wrapper */ @@ -7841,8 +7935,8 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5calls___get__(struct __pyx_obj * readonly int depth * readonly int calls * readonly bint threading_support # <<<<<<<<<<<<<< - * readonly bint detached * + * bint detached */ /* Python wrapper */ @@ -7887,56 +7981,6 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_17threading_support___get__(str return __pyx_r; } -/* "hunter/_event.pxd":19 - * readonly int calls - * readonly bint threading_support - * readonly bint detached # <<<<<<<<<<<<<< - * - * object _code - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_8detached_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_8detached_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_8detached___get__(((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_8detached___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 19, 0, __PYX_ERR(1, 19, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->detached); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._event.Event.detached.__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 @@ -7944,19 +7988,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8detached___get__(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +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) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_4__reduce_cython__(((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_self)); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_6__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_4__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_6_event_5Event_6__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; @@ -8379,19 +8423,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4__reduce_cython__(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_6_event_5Event_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_6hunter_6_event_5Event_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +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) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_6_event_5Event_6__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_8__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_6__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_8__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 @@ -9854,13 +9898,10 @@ static PyObject *__pyx_getprop_6hunter_6_event_5Event_threading_support(PyObject return __pyx_pw_6hunter_6_event_5Event_17threading_support_1__get__(o); } -static PyObject *__pyx_getprop_6hunter_6_event_5Event_detached(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_6hunter_6_event_5Event_8detached_1__get__(o); -} - static PyMethodDef __pyx_methods_6hunter_6_event_Event[] = { - {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_5__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_7__setstate_cython__, METH_O, 0}, + {"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}, {0, 0, 0, 0} }; @@ -9884,7 +9925,6 @@ static struct PyGetSetDef __pyx_getsets_6hunter_6_event_Event[] = { {(char *)"depth", __pyx_getprop_6hunter_6_event_5Event_depth, 0, (char *)0, 0}, {(char *)"calls", __pyx_getprop_6hunter_6_event_5Event_calls, 0, (char *)0, 0}, {(char *)"threading_support", __pyx_getprop_6hunter_6_event_5Event_threading_support, 0, (char *)0, 0}, - {(char *)"detached", __pyx_getprop_6hunter_6_event_5Event_detached, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; @@ -9903,7 +9943,7 @@ static PySequenceMethods __pyx_tp_as_sequence_Event = { static PyMappingMethods __pyx_tp_as_mapping_Event = { 0, /*mp_length*/ - __pyx_pw_6hunter_6_event_5Event_3__getitem__, /*mp_subscript*/ + __pyx_pw_6hunter_6_event_5Event_5__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; @@ -10276,6 +10316,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_tracer, __pyx_k_tracer, sizeof(__pyx_k_tracer), 0, 0, 1, 1}, {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, {&__pyx_n_s_util, __pyx_k_util, sizeof(__pyx_k_util), 0, 0, 1, 1}, + {&__pyx_n_s_value_filter, __pyx_k_value_filter, sizeof(__pyx_k_value_filter), 0, 0, 1, 1}, {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, {&__pyx_n_s_yield_lines, __pyx_k_yield_lines, sizeof(__pyx_k_yield_lines), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} @@ -10450,7 +10491,7 @@ 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; - __pyx_vtable_6hunter_6_event_Event.detach = (struct __pyx_obj_6hunter_6_event_Event *(*)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args))__pyx_f_6hunter_6_event_5Event_detach; + __pyx_vtable_6hunter_6_event_Event.detach = (struct __pyx_obj_6hunter_6_event_Event *(*)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args))__pyx_f_6hunter_6_event_5Event_detach; 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; @@ -11146,7 +11187,7 @@ if (!__Pyx_RefNanny) { /* "hunter/_event.pyx":76 * self._thread = UNSET * - * cdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< + * cpdef inline Event detach(self, value_filter=None): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * */ diff --git a/src/hunter/_event.pxd b/src/hunter/_event.pxd index 4b043e5..47d9edb 100644 --- a/src/hunter/_event.pxd +++ b/src/hunter/_event.pxd @@ -16,8 +16,8 @@ cdef class Event: readonly int depth readonly int calls readonly bint threading_support - readonly bint detached + bint detached object _code object _filename object _fullsource @@ -33,6 +33,6 @@ cdef class Event: object _threadidn # slightly different name cause "_threadid" is a goddamn macro in Microsoft stddef.h object _threadname - cpdef: Event clone(self) - Event detach(self, value_filter=?) + + cpdef Event detach(self, value_filter=?) diff --git a/src/hunter/_event.pyx b/src/hunter/_event.pyx index 6898726..639b3cd 100644 --- a/src/hunter/_event.pyx +++ b/src/hunter/_event.pyx @@ -73,7 +73,7 @@ cdef class Event: self._threadname = UNSET self._thread = UNSET - cdef inline Event detach(self, value_filter=None): + cpdef inline Event detach(self, value_filter=None): event = Event.__new__(Event) event._code = self.code diff --git a/src/hunter/_predicates.c b/src/hunter/_predicates.c index b85173d..0b71e75 100644 --- a/src/hunter/_predicates.c +++ b/src/hunter/_predicates.c @@ -810,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_predicates.pyx", "src/hunter/_predicates.pxd", "stringsource", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", + ".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", }; @@ -842,10 +842,10 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr; struct __pyx_opt_args_6hunter_6_event_5Event_detach; -/* "_event.pxd":37 - * +/* "_event.pxd":38 * Event clone(self) - * Event detach(self, value_filter=?) # <<<<<<<<<<<<<< + * + * cpdef Event detach(self, value_filter=?) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6hunter_6_event_5Event_detach { int __pyx_n; @@ -1147,7 +1147,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr { }; -/* "hunter/_predicates.pyx":543 +/* "hunter/_predicates.pyx":546 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1160,7 +1160,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ { }; -/* "hunter/_predicates.pyx":544 +/* "hunter/_predicates.pyx":547 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1176,7 +1176,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr { }; -/* "hunter/_predicates.pyx":596 +/* "hunter/_predicates.pyx":599 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1189,7 +1189,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ { }; -/* "hunter/_predicates.pyx":597 +/* "hunter/_predicates.pyx":600 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1216,7 +1216,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr { struct __pyx_vtabstruct_6hunter_6_event_Event { struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); - struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); + struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; @@ -14640,8 +14640,8 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *(*__pyx_t_10)(PyObject *); - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_13; int __pyx_t_14; int __pyx_lineno = 0; @@ -14835,8 +14835,8 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * first_frame = first_event.frame.f_back * else: * first_frame = first_event.frame # <<<<<<<<<<<<<< - * if first_frame is not None: - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * # print(f"FIRST IS CALL {first_is_call}") + * # print(f"FIRST FRAME {first_frame}") */ __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error)) /*else*/ { @@ -14847,27 +14847,27 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_L6:; - /* "hunter/_predicates.pyx":493 - * else: - * first_frame = first_event.frame + /* "hunter/_predicates.pyx":495 + * # print(f"FIRST IS CALL {first_is_call}") + * # print(f"FIRST FRAME {first_frame}") * if first_frame is not None: # <<<<<<<<<<<<<< * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame */ - __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error)) + __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_first_frame) != Py_None); __pyx_t_8 = (__pyx_t_3 != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":494 - * first_frame = first_event.frame + /* "hunter/_predicates.pyx":496 + * # print(f"FIRST FRAME {first_frame}") * if first_frame is not None: * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full # <<<<<<<<<<<<<< * frame = first_frame * depth_delta = 0 */ - __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) + __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -14881,43 +14881,43 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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, 494, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __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":495 + /* "hunter/_predicates.pyx":497 * if first_frame is not None: * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame # <<<<<<<<<<<<<< * depth_delta = 0 * while frame and depth_delta < missing_depth: */ - __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_first_frame)); __pyx_v_frame = __pyx_v_first_frame; - /* "hunter/_predicates.pyx":496 + /* "hunter/_predicates.pyx":498 * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame * depth_delta = 0 # <<<<<<<<<<<<<< * while frame and depth_delta < missing_depth: * stack_event = Event( */ - __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) + __Pyx_TraceLine(498,0,__PYX_ERR(0, 498, __pyx_L1_error)) __pyx_v_depth_delta = 0; - /* "hunter/_predicates.pyx":497 + /* "hunter/_predicates.pyx":499 * frame = first_frame * depth_delta = 0 * while 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)) + __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error)) while (1) { - __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 499, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_8 = __pyx_t_3; @@ -14928,81 +14928,81 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_L10_bool_binop_done:; if (!__pyx_t_8) break; - /* "hunter/_predicates.pyx":499 + /* "hunter/_predicates.pyx":501 * while 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_TraceLine(501,0,__PYX_ERR(0, 501, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __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) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_frame, ((PyObject *)__pyx_v_frame)) < 0) __PYX_ERR(0, 501, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_kind, __pyx_n_s_call) < 0) __PYX_ERR(0, 501, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_arg, Py_None) < 0) __PYX_ERR(0, 501, __pyx_L1_error) - /* "hunter/_predicates.pyx":500 + /* "hunter/_predicates.pyx":502 * 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_TraceLine(502,0,__PYX_ERR(0, 502, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_event->threading_support); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __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) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_threading_support, __pyx_t_1) < 0) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":501 + /* "hunter/_predicates.pyx":503 * 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_TraceLine(503,0,__PYX_ERR(0, 503, __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, 503, __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) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_depth, __pyx_t_1) < 0) __PYX_ERR(0, 501, __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) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_calls, __pyx_int_neg_1) < 0) __PYX_ERR(0, 501, __pyx_L1_error) - /* "hunter/_predicates.pyx":498 + /* "hunter/_predicates.pyx":500 * depth_delta = 0 * while 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_TraceLine(500,0,__PYX_ERR(0, 500, __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, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_1)); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":503 + /* "hunter/_predicates.pyx":505 * depth=first_depth - depth_delta - 1, calls=-1 * ) * if not self.vars: # <<<<<<<<<<<<<< * # noinspection PyPropertyAccess * stack_event._locals = {} */ - __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error)) + __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error)) __pyx_t_8 = ((!(__pyx_v_self->vars != 0)) != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":505 + /* "hunter/_predicates.pyx":507 * if not self.vars: * # noinspection PyPropertyAccess * stack_event._locals = {} # <<<<<<<<<<<<<< * stack_event._globals = {} * stack_event.detached = True */ - __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_stack_event->_locals); @@ -15010,15 +15010,15 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_v_stack_event->_locals = __pyx_t_1; __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":506 + /* "hunter/_predicates.pyx":508 * # noinspection PyPropertyAccess * stack_event._locals = {} * stack_event._globals = {} # <<<<<<<<<<<<<< * stack_event.detached = True * stack_events.appendleft(stack_event) */ - __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_stack_event->_globals); @@ -15026,17 +15026,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_v_stack_event->_globals = __pyx_t_1; __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":507 + /* "hunter/_predicates.pyx":509 * stack_event._locals = {} * stack_event._globals = {} * stack_event.detached = True # <<<<<<<<<<<<<< * stack_events.appendleft(stack_event) * frame = frame.f_back */ - __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) + __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) __pyx_v_stack_event->detached = 1; - /* "hunter/_predicates.pyx":503 + /* "hunter/_predicates.pyx":505 * depth=first_depth - depth_delta - 1, calls=-1 * ) * if not self.vars: # <<<<<<<<<<<<<< @@ -15045,15 +15045,15 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ } - /* "hunter/_predicates.pyx":508 + /* "hunter/_predicates.pyx":510 * stack_event._globals = {} * stack_event.detached = True * stack_events.appendleft(stack_event) # <<<<<<<<<<<<<< * frame = frame.f_back * depth_delta += 1 */ - __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __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, 508, __pyx_L1_error) + __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __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, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15067,68 +15067,68 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_stack_event)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __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":509 + /* "hunter/_predicates.pyx":511 * stack_event.detached = True * stack_events.appendleft(stack_event) * frame = frame.f_back # <<<<<<<<<<<<<< * depth_delta += 1 * for stack_event in stack_events: */ - __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) + __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __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) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6hunter_7_tracer_FrameType))))) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_frame, ((PyFrameObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":510 + /* "hunter/_predicates.pyx":512 * stack_events.appendleft(stack_event) * frame = frame.f_back * depth_delta += 1 # <<<<<<<<<<<<<< * for stack_event in stack_events: - * if self._filter is None: + * if self._filter is None or self._filter(stack_event): */ - __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __pyx_L1_error)) + __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error)) __pyx_v_depth_delta = (__pyx_v_depth_delta + 1); } - /* "hunter/_predicates.pyx":511 + /* "hunter/_predicates.pyx":513 * frame = frame.f_back * depth_delta += 1 * for stack_event in stack_events: # <<<<<<<<<<<<<< - * if self._filter is None: + * if self._filter is None or self._filter(stack_event): * self.action(stack_event) */ - __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) + __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __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_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stack_events); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __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) + __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 513, __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) + __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, 513, __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_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __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) + __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, 513, __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_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -15138,142 +15138,102 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s 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) + else __PYX_ERR(0, 513, __pyx_L1_error) } break; } __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, 511, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2)); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":512 - * depth_delta += 1 - * 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_11 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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 + /* "hunter/_predicates.pyx":514 * depth_delta += 1 * for stack_event in stack_events: - * if self._filter is None: # <<<<<<<<<<<<<< - * self.action(stack_event) - * elif self._filter(stack_event): - */ - goto __pyx_L15; - } - - /* "hunter/_predicates.pyx":514 - * if self._filter is None: - * self.action(stack_event) - * elif self._filter(stack_event): # <<<<<<<<<<<<<< + * if self._filter is None or 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_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_L16_bool_binop_done; + } __Pyx_INCREF(__pyx_v_self->_filter); - __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_11 = NULL; + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_11)) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_3) { + __pyx_t_8 = __pyx_t_11; + __pyx_L16_bool_binop_done:; + if (__pyx_t_8) { /* "hunter/_predicates.pyx":515 - * self.action(stack_event) - * elif self._filter(stack_event): + * for stack_event in stack_events: + * if self._filter is None or 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_11 = NULL; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_11)) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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): # <<<<<<<<<<<<<< + * depth_delta += 1 + * for stack_event in stack_events: + * if self._filter is None or self._filter(stack_event): # <<<<<<<<<<<<<< * self.action(stack_event) * for backlog_event in self.queue: */ } - __pyx_L15:; - /* "hunter/_predicates.pyx":511 + /* "hunter/_predicates.pyx":513 * frame = frame.f_back * depth_delta += 1 * for stack_event in stack_events: # <<<<<<<<<<<<<< - * if self._filter is None: + * if self._filter is None or self._filter(stack_event): * self.action(stack_event) */ - __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) + __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":493 - * else: - * first_frame = first_event.frame + /* "hunter/_predicates.pyx":495 + * # print(f"FIRST IS CALL {first_is_call}") + * # print(f"FIRST FRAME {first_frame}") * if first_frame is not None: # <<<<<<<<<<<<<< * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame @@ -15290,7 +15250,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } /* "hunter/_predicates.pyx":516 - * elif self._filter(stack_event): + * if self._filter is None or self._filter(stack_event): * self.action(stack_event) * for backlog_event in self.queue: # <<<<<<<<<<<<<< * if self._filter is None: @@ -15347,9 +15307,9 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * 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) { + __pyx_t_8 = (__pyx_v_self->_filter == Py_None); + __pyx_t_11 = (__pyx_t_8 != 0); + if (__pyx_t_11) { /* "hunter/_predicates.pyx":518 * for backlog_event in self.queue: @@ -15360,18 +15320,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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_11 = NULL; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_11)) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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; @@ -15384,7 +15344,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * self.action(backlog_event) * elif self._filter(backlog_event): */ - goto __pyx_L18; + goto __pyx_L20; } /* "hunter/_predicates.pyx":519 @@ -15396,24 +15356,24 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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_11 = NULL; + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_11)) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_8) { + if (__pyx_t_11) { /* "hunter/_predicates.pyx":520 * self.action(backlog_event) @@ -15424,18 +15384,18 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __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_11 = NULL; + __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_11)) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_11); + __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - __pyx_t_2 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_11, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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; @@ -15449,10 +15409,10 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * self.queue.clear() */ } - __pyx_L18:; + __pyx_L20:; /* "hunter/_predicates.pyx":516 - * elif self._filter(stack_event): + * if self._filter is None or self._filter(stack_event): * self.action(stack_event) * for backlog_event in self.queue: # <<<<<<<<<<<<<< * if self._filter is None: @@ -15517,23 +15477,23 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ __Pyx_TraceLine(523,0,__PYX_ERR(0, 523, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = (__pyx_v_self->strip != 0); - if (__pyx_t_3) { + __pyx_t_8 = (__pyx_v_self->strip != 0); + if (__pyx_t_8) { } else { - __pyx_t_8 = __pyx_t_3; - goto __pyx_L20_bool_binop_done; + __pyx_t_11 = __pyx_t_8; + goto __pyx_L22_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) { + __pyx_t_8 = ((__pyx_v_event->depth < 1) != 0); + __pyx_t_11 = __pyx_t_8; + __pyx_L22_bool_binop_done:; + if (__pyx_t_11) { /* "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) + * # print(f"PRE DETACH EVENT FRAME {event.frame}") */ __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) @@ -15568,16 +15528,16 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * # 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): # <<<<<<<<<<<<<< + * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) - * detached_event.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_12 = (__pyx_t_3 != 0); - if (!__pyx_t_12) { + __pyx_t_8 = (__pyx_v_self->_filter == Py_None); + __pyx_t_3 = (__pyx_t_8 != 0); + if (!__pyx_t_3) { } else { - __pyx_t_8 = __pyx_t_12; - goto __pyx_L23_bool_binop_done; + __pyx_t_11 = __pyx_t_3; + goto __pyx_L25_bool_binop_done; } __Pyx_INCREF(__pyx_v_self->_filter); __pyx_t_2 = __pyx_v_self->_filter; __pyx_t_4 = NULL; @@ -15595,22 +15555,22 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s 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_12 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __pyx_t_12; - __pyx_L23_bool_binop_done:; - if (__pyx_t_8) { + __pyx_t_11 = __pyx_t_3; + __pyx_L25_bool_binop_done:; + if (__pyx_t_11) { - /* "hunter/_predicates.pyx":528 - * self.queue.clear() + /* "hunter/_predicates.pyx":529 * if self._filter is None or self._filter(event): + * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) # <<<<<<<<<<<<<< * detached_event.frame = event.frame - * self.queue.append(detached_event) + * # print(f"EVENT FRAME {event.frame}") */ - __Pyx_TraceLine(528,0,__PYX_ERR(0, 528, __pyx_L1_error)) + __Pyx_TraceLine(529,0,__PYX_ERR(0, 529, __pyx_L1_error)) if ((__pyx_v_self->vars != 0)) { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -15620,20 +15580,20 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_13.__pyx_n = 1; __pyx_t_13.value_filter = __pyx_t_1; - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, 0, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_detached_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":529 - * if self._filter is None or self._filter(event): + /* "hunter/_predicates.pyx":530 + * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) * detached_event.frame = event.frame # <<<<<<<<<<<<<< - * self.queue.append(detached_event) - * + * # print(f"EVENT FRAME {event.frame}") + * # print(f"DETACHED FRAME {detached_event.frame}") */ - __Pyx_TraceLine(529,0,__PYX_ERR(0, 529, __pyx_L1_error)) + __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_event->frame); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -15642,35 +15602,35 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_v_detached_event->frame = ((PyFrameObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":530 - * detached_event = event.detach(self.action.try_repr if self.vars else None) - * detached_event.frame = event.frame + /* "hunter/_predicates.pyx":533 + * # print(f"EVENT FRAME {event.frame}") + * # print(f"DETACHED FRAME {detached_event.frame}") * self.queue.append(detached_event) # <<<<<<<<<<<<<< * * return result */ - __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_TraceLine(533,0,__PYX_ERR(0, 533, __pyx_L1_error)) + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 533, __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): # <<<<<<<<<<<<<< + * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) - * detached_event.frame = event.frame */ } } __pyx_L3:; - /* "hunter/_predicates.pyx":532 + /* "hunter/_predicates.pyx":535 * self.queue.append(detached_event) * * return result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(532,0,__PYX_ERR(0, 532, __pyx_L1_error)) + __Pyx_TraceLine(535,0,__PYX_ERR(0, 535, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -15689,7 +15649,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_11); + __Pyx_XDECREF(__pyx_t_12); __Pyx_AddTraceback("hunter._predicates.fast_Backlog_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -15707,7 +15667,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s return __pyx_r; } -/* "hunter/_predicates.pyx":540 +/* "hunter/_predicates.pyx":543 * `And` predicate. Exits at the first sub-predicate that returns ``False``. * """ * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -15741,23 +15701,23 @@ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 540, 0, __PYX_ERR(0, 540, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 543, 0, __PYX_ERR(0, 543, __pyx_L1_error)); - /* "hunter/_predicates.pyx":541 + /* "hunter/_predicates.pyx":544 * """ * def __init__(self, *predicates): * self.predicates = predicates # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(541,0,__PYX_ERR(0, 541, __pyx_L1_error)) + __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __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 + /* "hunter/_predicates.pyx":543 * `And` predicate. Exits at the first sub-predicate that returns ``False``. * """ * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -15777,7 +15737,7 @@ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_predicates.pyx":543 +/* "hunter/_predicates.pyx":546 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -15799,7 +15759,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3And_3__str__(PyObject *__pyx_v_ } 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 +/* "hunter/_predicates.pyx":547 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -15819,7 +15779,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(PyObject * 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, 544, __pyx_L1_error) + __PYX_ERR(0, 547, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -15827,7 +15787,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_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_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_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, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -15856,7 +15816,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 547, 0, __PYX_ERR(0, 547, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; @@ -15866,26 +15826,26 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ return NULL; } __pyx_L3_first_run:; - 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_sent_value)) __PYX_ERR(0, 547, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 547, __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, 544, __pyx_L1_error) + __PYX_ERR(0, 547, __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, 544, __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, 547, __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, 544, __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, 547, __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, 544, __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, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -15904,7 +15864,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__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, 544, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 547, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -15928,7 +15888,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":543 +/* "hunter/_predicates.pyx":546 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -15951,37 +15911,37 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6 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, 543, __pyx_L1_error) + __PYX_ERR(0, 546, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__str__", __pyx_f[0], 543, 0, __PYX_ERR(0, 543, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __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":544 + /* "hunter/_predicates.pyx":547 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __pyx_L1_error)) + __Pyx_TraceLine(547,0,__PYX_ERR(0, 547, __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, 544, __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, 547, __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, 544, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __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_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_t_1 = __Pyx_PyString_Format(__pyx_kp_s_And_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __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":543 + /* "hunter/_predicates.pyx":546 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -16003,7 +15963,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":546 +/* "hunter/_predicates.pyx":549 * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16034,30 +15994,30 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 549, 0, __PYX_ERR(0, 549, __pyx_L1_error)); - /* "hunter/_predicates.pyx":547 + /* "hunter/_predicates.pyx":550 * * def __repr__(self): * return '' % (self.predicates,) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(547,0,__PYX_ERR(0, 547, __pyx_L1_error)) + __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __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, 547, __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, 550, __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":546 + /* "hunter/_predicates.pyx":549 * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16078,7 +16038,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":549 +/* "hunter/_predicates.pyx":552 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -16110,45 +16070,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 549, 0, __PYX_ERR(0, 549, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 552, 0, __PYX_ERR(0, 552, __pyx_L1_error)); - /* "hunter/_predicates.pyx":550 + /* "hunter/_predicates.pyx":553 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, And) * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __pyx_L1_error)) + __Pyx_TraceLine(553,0,__PYX_ERR(0, 553, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":551 + /* "hunter/_predicates.pyx":554 * def __eq__(self, other): * return ( * isinstance(other, And) # <<<<<<<<<<<<<< * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(551,0,__PYX_ERR(0, 551, __pyx_L1_error)) + __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __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, 551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __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":552 + /* "hunter/_predicates.pyx":555 * return ( * isinstance(other, And) * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __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_TraceLine(555,0,__PYX_ERR(0, 555, __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, 555, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -16157,7 +16117,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":549 + /* "hunter/_predicates.pyx":552 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -16178,7 +16138,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":555 +/* "hunter/_predicates.pyx":558 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -16209,17 +16169,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 555, 0, __PYX_ERR(0, 555, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __pyx_L1_error)); - /* "hunter/_predicates.pyx":556 + /* "hunter/_predicates.pyx":559 * * def __hash__(self): * return hash(('And', self.predicates)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __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_TraceLine(559,0,__PYX_ERR(0, 559, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_And); __Pyx_GIVEREF(__pyx_n_s_And); @@ -16227,12 +16187,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ __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, 556, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":555 + /* "hunter/_predicates.pyx":558 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -16252,7 +16212,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":558 +/* "hunter/_predicates.pyx":561 * return hash(('And', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -16289,7 +16249,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3And_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, 558, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 561, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -16300,13 +16260,13 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3And_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, 558, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 561, __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, 558, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 561, __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 */ @@ -16327,24 +16287,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 561, 0, __PYX_ERR(0, 561, __pyx_L1_error)); - /* "hunter/_predicates.pyx":559 + /* "hunter/_predicates.pyx":562 * * def __call__(self, Event event): * return fast_And_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(559,0,__PYX_ERR(0, 559, __pyx_L1_error)) + __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __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, 559, __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, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":558 + /* "hunter/_predicates.pyx":561 * return hash(('And', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -16364,7 +16324,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":561 +/* "hunter/_predicates.pyx":564 * return fast_And_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -16395,18 +16355,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 561, 0, __PYX_ERR(0, 561, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 564, 0, __PYX_ERR(0, 564, __pyx_L1_error)); - /* "hunter/_predicates.pyx":562 + /* "hunter/_predicates.pyx":565 * * def __or__(self, other): * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error)) + __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __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_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -16414,14 +16374,14 @@ 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, 562, __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, 565, __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 + /* "hunter/_predicates.pyx":564 * return fast_And_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -16442,7 +16402,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":564 +/* "hunter/_predicates.pyx":567 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -16477,34 +16437,34 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 564, 0, __PYX_ERR(0, 564, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 567, 0, __PYX_ERR(0, 567, __pyx_L1_error)); - /* "hunter/_predicates.pyx":566 + /* "hunter/_predicates.pyx":569 * def __and__(self, other): * cdef list predicates * if type(self) is And: # <<<<<<<<<<<<<< * predicates = list((self).predicates) * else: */ - __Pyx_TraceLine(566,0,__PYX_ERR(0, 566, __pyx_L1_error)) + __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __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":567 + /* "hunter/_predicates.pyx":570 * cdef list predicates * if type(self) is And: * predicates = list((self).predicates) # <<<<<<<<<<<<<< * else: * predicates = [self] */ - __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_TraceLine(570,0,__PYX_ERR(0, 570, __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, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_predicates = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":566 + /* "hunter/_predicates.pyx":569 * def __and__(self, other): * cdef list predicates * if type(self) is And: # <<<<<<<<<<<<<< @@ -16514,16 +16474,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v goto __pyx_L3; } - /* "hunter/_predicates.pyx":569 + /* "hunter/_predicates.pyx":572 * predicates = list((self).predicates) * else: * predicates = [self] # <<<<<<<<<<<<<< * if isinstance(other, And): * predicates.extend(( other).predicates) */ - __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __pyx_L1_error)) + __Pyx_TraceLine(572,0,__PYX_ERR(0, 572, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -16533,32 +16493,32 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v } __pyx_L3:; - /* "hunter/_predicates.pyx":570 + /* "hunter/_predicates.pyx":573 * else: * predicates = [self] * if isinstance(other, And): # <<<<<<<<<<<<<< * predicates.extend(( other).predicates) * else: */ - __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __pyx_L1_error)) + __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __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":571 + /* "hunter/_predicates.pyx":574 * predicates = [self] * if isinstance(other, And): * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< * else: * predicates.append(other) */ - __Pyx_TraceLine(571,0,__PYX_ERR(0, 571, __pyx_L1_error)) + __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __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, 571, __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, 574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":570 + /* "hunter/_predicates.pyx":573 * else: * predicates = [self] * if isinstance(other, And): # <<<<<<<<<<<<<< @@ -16568,38 +16528,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v goto __pyx_L4; } - /* "hunter/_predicates.pyx":573 + /* "hunter/_predicates.pyx":576 * predicates.extend(( other).predicates) * else: * predicates.append(other) # <<<<<<<<<<<<<< * return And(*predicates) * */ - __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __pyx_L1_error)) + __Pyx_TraceLine(576,0,__PYX_ERR(0, 576, __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, 573, __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, 576, __pyx_L1_error) } __pyx_L4:; - /* "hunter/_predicates.pyx":574 + /* "hunter/_predicates.pyx":577 * else: * predicates.append(other) * return And(*predicates) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __pyx_L1_error)) + __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __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, 574, __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, 577, __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":564 + /* "hunter/_predicates.pyx":567 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -16621,7 +16581,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":576 +/* "hunter/_predicates.pyx":579 * return And(*predicates) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -16651,24 +16611,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 576, 0, __PYX_ERR(0, 576, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error)); - /* "hunter/_predicates.pyx":577 + /* "hunter/_predicates.pyx":580 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef inline fast_And_call(And self, Event event): */ - __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __pyx_L1_error)) + __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __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, 577, __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, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":576 + /* "hunter/_predicates.pyx":579 * return And(*predicates) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -17043,7 +17003,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struc return __pyx_r; } -/* "hunter/_predicates.pyx":579 +/* "hunter/_predicates.pyx":582 * return Not(self) * * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< @@ -17065,62 +17025,62 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_And_call", 0); - __Pyx_TraceCall("fast_And_call", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error)); + __Pyx_TraceCall("fast_And_call", __pyx_f[0], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error)); - /* "hunter/_predicates.pyx":580 + /* "hunter/_predicates.pyx":583 * * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if not fast_call(predicate, event): * return False */ - __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) + __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) if (unlikely(__pyx_v_self->predicates == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 580, __pyx_L1_error) + __PYX_ERR(0, 583, __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, 580, __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, 583, __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, 580, __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, 583, __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":581 + /* "hunter/_predicates.pyx":584 * 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(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_TraceLine(584,0,__PYX_ERR(0, 584, __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, 584, __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, 581, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 584, __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":582 + /* "hunter/_predicates.pyx":585 * for predicate in self.predicates: * if not fast_call(predicate, event): * return False # <<<<<<<<<<<<<< * else: * return True */ - __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error)) + __Pyx_TraceLine(585,0,__PYX_ERR(0, 585, __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":581 + /* "hunter/_predicates.pyx":584 * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: * if not fast_call(predicate, event): # <<<<<<<<<<<<<< @@ -17129,25 +17089,25 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc */ } - /* "hunter/_predicates.pyx":580 + /* "hunter/_predicates.pyx":583 * * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if not fast_call(predicate, event): * return False */ - __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) + __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) } /*else*/ { - /* "hunter/_predicates.pyx":584 + /* "hunter/_predicates.pyx":587 * return False * else: * return True # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(584,0,__PYX_ERR(0, 584, __pyx_L1_error)) + __Pyx_TraceLine(587,0,__PYX_ERR(0, 587, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_True); __pyx_r = Py_True; @@ -17155,17 +17115,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc goto __pyx_L0; } - /* "hunter/_predicates.pyx":580 + /* "hunter/_predicates.pyx":583 * * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if not fast_call(predicate, event): * return False */ - __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) + __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":579 + /* "hunter/_predicates.pyx":582 * return Not(self) * * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< @@ -17187,7 +17147,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc return __pyx_r; } -/* "hunter/_predicates.pyx":593 +/* "hunter/_predicates.pyx":596 * """ * * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -17221,23 +17181,23 @@ static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 593, 0, __PYX_ERR(0, 593, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 596, 0, __PYX_ERR(0, 596, __pyx_L1_error)); - /* "hunter/_predicates.pyx":594 + /* "hunter/_predicates.pyx":597 * * def __init__(self, *predicates): * self.predicates = predicates # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(594,0,__PYX_ERR(0, 594, __pyx_L1_error)) + __Pyx_TraceLine(597,0,__PYX_ERR(0, 597, __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":593 + /* "hunter/_predicates.pyx":596 * """ * * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -17257,7 +17217,7 @@ static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_ return __pyx_r; } -/* "hunter/_predicates.pyx":596 +/* "hunter/_predicates.pyx":599 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -17279,7 +17239,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_2Or_3__str__(PyObject *__pyx_v_s } 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":597 +/* "hunter/_predicates.pyx":600 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -17299,7 +17259,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *_ 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) + __PYX_ERR(0, 600, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -17307,7 +17267,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_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_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_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, 600, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17336,7 +17296,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 597, 0, __PYX_ERR(0, 597, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 600, 0, __PYX_ERR(0, 600, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; @@ -17346,26 +17306,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, 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_sent_value)) __PYX_ERR(0, 600, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 600, __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_ERR(0, 600, __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) + __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, 600, __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_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __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_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_cur_scope->__pyx_v_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -17384,7 +17344,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, 597, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 600, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -17408,7 +17368,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C return __pyx_r; } -/* "hunter/_predicates.pyx":596 +/* "hunter/_predicates.pyx":599 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -17431,37 +17391,37 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h 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) + __PYX_ERR(0, 599, __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_TraceCall("__str__", __pyx_f[0], 599, 0, __PYX_ERR(0, 599, __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":597 + /* "hunter/_predicates.pyx":600 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(597,0,__PYX_ERR(0, 597, __pyx_L1_error)) + __Pyx_TraceLine(600,0,__PYX_ERR(0, 600, __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, 597, __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, 600, __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_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __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_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_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Or_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __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":596 + /* "hunter/_predicates.pyx":599 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -17483,7 +17443,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":599 +/* "hunter/_predicates.pyx":602 * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -17514,30 +17474,30 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 599, 0, __PYX_ERR(0, 599, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error)); - /* "hunter/_predicates.pyx":600 + /* "hunter/_predicates.pyx":603 * * def __repr__(self): * return '' % (self.predicates,) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(600,0,__PYX_ERR(0, 600, __pyx_L1_error)) + __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __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, 600, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_Or_predicate, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __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":599 + /* "hunter/_predicates.pyx":602 * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -17558,7 +17518,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":602 +/* "hunter/_predicates.pyx":605 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -17590,45 +17550,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 605, 0, __PYX_ERR(0, 605, __pyx_L1_error)); - /* "hunter/_predicates.pyx":603 + /* "hunter/_predicates.pyx":606 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, Or) * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) + __Pyx_TraceLine(606,0,__PYX_ERR(0, 606, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":604 + /* "hunter/_predicates.pyx":607 * def __eq__(self, other): * return ( * isinstance(other, Or) # <<<<<<<<<<<<<< * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(604,0,__PYX_ERR(0, 604, __pyx_L1_error)) + __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __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, 604, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __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":605 + /* "hunter/_predicates.pyx":608 * return ( * isinstance(other, Or) * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __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_TraceLine(608,0,__PYX_ERR(0, 608, __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, 608, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17637,7 +17597,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":602 + /* "hunter/_predicates.pyx":605 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -17658,7 +17618,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu return __pyx_r; } -/* "hunter/_predicates.pyx":608 +/* "hunter/_predicates.pyx":611 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -17689,17 +17649,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); - /* "hunter/_predicates.pyx":609 + /* "hunter/_predicates.pyx":612 * * def __hash__(self): * return hash(('Or', self.predicates)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __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_TraceLine(612,0,__PYX_ERR(0, 612, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Or); __Pyx_GIVEREF(__pyx_n_s_Or); @@ -17707,12 +17667,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 __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_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":608 + /* "hunter/_predicates.pyx":611 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -17732,7 +17692,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":611 +/* "hunter/_predicates.pyx":614 * return hash(('Or', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -17769,7 +17729,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, 611, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 614, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -17780,13 +17740,13 @@ 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, 611, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 614, __pyx_L3_error) __pyx_L3_error:; __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, 611, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 614, __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 */ @@ -17807,24 +17767,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error)); - /* "hunter/_predicates.pyx":612 + /* "hunter/_predicates.pyx":615 * * def __call__(self, Event event): * return fast_Or_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(612,0,__PYX_ERR(0, 612, __pyx_L1_error)) + __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __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, 612, __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, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":611 + /* "hunter/_predicates.pyx":614 * return hash(('Or', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -17844,7 +17804,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":614 +/* "hunter/_predicates.pyx":617 * return fast_Or_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -17879,34 +17839,34 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 617, 0, __PYX_ERR(0, 617, __pyx_L1_error)); - /* "hunter/_predicates.pyx":616 + /* "hunter/_predicates.pyx":619 * def __or__(self, other): * cdef list predicates * if type(self) is Or: # <<<<<<<<<<<<<< * predicates = list(( self).predicates) * else: */ - __Pyx_TraceLine(616,0,__PYX_ERR(0, 616, __pyx_L1_error)) + __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __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":617 + /* "hunter/_predicates.pyx":620 * cdef list predicates * if type(self) is Or: * predicates = list(( self).predicates) # <<<<<<<<<<<<<< * else: * predicates = [self] */ - __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_TraceLine(620,0,__PYX_ERR(0, 620, __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, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_predicates = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":616 + /* "hunter/_predicates.pyx":619 * def __or__(self, other): * cdef list predicates * if type(self) is Or: # <<<<<<<<<<<<<< @@ -17916,16 +17876,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s goto __pyx_L3; } - /* "hunter/_predicates.pyx":619 + /* "hunter/_predicates.pyx":622 * predicates = list(( self).predicates) * else: * predicates = [self] # <<<<<<<<<<<<<< * if type(other) is Or: * predicates.extend(( other).predicates) */ - __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error)) + __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -17935,32 +17895,32 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s } __pyx_L3:; - /* "hunter/_predicates.pyx":620 + /* "hunter/_predicates.pyx":623 * 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_TraceLine(623,0,__PYX_ERR(0, 623, __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 + /* "hunter/_predicates.pyx":624 * 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_TraceLine(624,0,__PYX_ERR(0, 624, __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_t_4 = __Pyx_PyList_Extend(__pyx_v_predicates, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":620 + /* "hunter/_predicates.pyx":623 * else: * predicates = [self] * if type(other) is Or: # <<<<<<<<<<<<<< @@ -17970,38 +17930,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s goto __pyx_L4; } - /* "hunter/_predicates.pyx":623 + /* "hunter/_predicates.pyx":626 * predicates.extend(( other).predicates) * else: * predicates.append(other) # <<<<<<<<<<<<<< * return Or(*predicates) * */ - __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error)) + __Pyx_TraceLine(626,0,__PYX_ERR(0, 626, __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_t_4 = __Pyx_PyList_Append(__pyx_v_predicates, __pyx_v_other); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 626, __pyx_L1_error) } __pyx_L4:; - /* "hunter/_predicates.pyx":624 + /* "hunter/_predicates.pyx":627 * else: * predicates.append(other) * return Or(*predicates) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(624,0,__PYX_ERR(0, 624, __pyx_L1_error)) + __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __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_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __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_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 627, __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 + /* "hunter/_predicates.pyx":617 * return fast_Or_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -18023,7 +17983,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s return __pyx_r; } -/* "hunter/_predicates.pyx":626 +/* "hunter/_predicates.pyx":629 * return Or(*predicates) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -18054,18 +18014,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 626, 0, __PYX_ERR(0, 626, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error)); - /* "hunter/_predicates.pyx":627 + /* "hunter/_predicates.pyx":630 * * def __and__(self, other): * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error)) + __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __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_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -18073,14 +18033,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(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_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __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, 630, __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":626 + /* "hunter/_predicates.pyx":629 * return Or(*predicates) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -18101,7 +18061,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":629 +/* "hunter/_predicates.pyx":632 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -18131,24 +18091,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error)); - /* "hunter/_predicates.pyx":630 + /* "hunter/_predicates.pyx":633 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef inline fast_Or_call(Or self, Event event): */ - __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) + __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __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, 630, __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, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":629 + /* "hunter/_predicates.pyx":632 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -18523,7 +18483,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct return __pyx_r; } -/* "hunter/_predicates.pyx":632 +/* "hunter/_predicates.pyx":635 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< @@ -18544,61 +18504,61 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Or_call", 0); - __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error)); + __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 635, 0, __PYX_ERR(0, 635, __pyx_L1_error)); - /* "hunter/_predicates.pyx":633 + /* "hunter/_predicates.pyx":636 * * 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_TraceLine(636,0,__PYX_ERR(0, 636, __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_ERR(0, 636, __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) + __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, 636, __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_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 636, __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":634 + /* "hunter/_predicates.pyx":637 * 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_TraceLine(637,0,__PYX_ERR(0, 637, __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, 637, __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_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "hunter/_predicates.pyx":635 + /* "hunter/_predicates.pyx":638 * 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_TraceLine(638,0,__PYX_ERR(0, 638, __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 + /* "hunter/_predicates.pyx":637 * cdef inline fast_Or_call(Or self, Event event): * for predicate in self.predicates: * if fast_call(predicate, event): # <<<<<<<<<<<<<< @@ -18607,25 +18567,25 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct */ } - /* "hunter/_predicates.pyx":633 + /* "hunter/_predicates.pyx":636 * * 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_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) } /*else*/ { - /* "hunter/_predicates.pyx":637 + /* "hunter/_predicates.pyx":640 * return True * else: * return False # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(637,0,__PYX_ERR(0, 637, __pyx_L1_error)) + __Pyx_TraceLine(640,0,__PYX_ERR(0, 640, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; @@ -18633,17 +18593,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct goto __pyx_L0; } - /* "hunter/_predicates.pyx":633 + /* "hunter/_predicates.pyx":636 * * 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_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":632 + /* "hunter/_predicates.pyx":635 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< @@ -18665,7 +18625,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct return __pyx_r; } -/* "hunter/_predicates.pyx":644 +/* "hunter/_predicates.pyx":647 * `Not` predicate. * """ * def __init__(self, predicate): # <<<<<<<<<<<<<< @@ -18702,7 +18662,7 @@ static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, 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) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 647, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -18713,7 +18673,7 @@ static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, } 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_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 647, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._predicates.Not.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18734,23 +18694,23 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 644, 0, __PYX_ERR(0, 644, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 647, 0, __PYX_ERR(0, 647, __pyx_L1_error)); - /* "hunter/_predicates.pyx":645 + /* "hunter/_predicates.pyx":648 * """ * def __init__(self, predicate): * self.predicate = predicate # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(645,0,__PYX_ERR(0, 645, __pyx_L1_error)) + __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __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":644 + /* "hunter/_predicates.pyx":647 * `Not` predicate. * """ * def __init__(self, predicate): # <<<<<<<<<<<<<< @@ -18770,7 +18730,7 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_predicates.pyx":647 +/* "hunter/_predicates.pyx":650 * self.predicate = predicate * * def __str__(self): # <<<<<<<<<<<<<< @@ -18800,24 +18760,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 647, 0, __PYX_ERR(0, 647, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error)); - /* "hunter/_predicates.pyx":648 + /* "hunter/_predicates.pyx":651 * * def __str__(self): * return 'Not(%s)' % self.predicate # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __pyx_L1_error)) + __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __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_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Not_s, __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":647 + /* "hunter/_predicates.pyx":650 * self.predicate = predicate * * def __str__(self): # <<<<<<<<<<<<<< @@ -18837,7 +18797,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":650 +/* "hunter/_predicates.pyx":653 * return 'Not(%s)' % self.predicate * * def __repr__(self): # <<<<<<<<<<<<<< @@ -18867,24 +18827,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error)); - /* "hunter/_predicates.pyx":651 + /* "hunter/_predicates.pyx":654 * * def __repr__(self): * return '' % self.predicate # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error)) + __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __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_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_hunter__predicates_Not_predicat, __pyx_v_self->predicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":650 + /* "hunter/_predicates.pyx":653 * return 'Not(%s)' % self.predicate * * def __repr__(self): # <<<<<<<<<<<<<< @@ -18904,7 +18864,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":653 +/* "hunter/_predicates.pyx":656 * return '' % self.predicate * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -18936,45 +18896,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 656, 0, __PYX_ERR(0, 656, __pyx_L1_error)); - /* "hunter/_predicates.pyx":654 + /* "hunter/_predicates.pyx":657 * * 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_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":655 + /* "hunter/_predicates.pyx":658 * 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_TraceLine(658,0,__PYX_ERR(0, 658, __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_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __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 + /* "hunter/_predicates.pyx":659 * 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_TraceLine(659,0,__PYX_ERR(0, 659, __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, 659, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18983,7 +18943,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":653 + /* "hunter/_predicates.pyx":656 * return '' % self.predicate * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -19004,7 +18964,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":659 +/* "hunter/_predicates.pyx":662 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -19035,17 +18995,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 659, 0, __PYX_ERR(0, 659, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 662, 0, __PYX_ERR(0, 662, __pyx_L1_error)); - /* "hunter/_predicates.pyx":660 + /* "hunter/_predicates.pyx":663 * * 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_TraceLine(663,0,__PYX_ERR(0, 663, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Not); __Pyx_GIVEREF(__pyx_n_s_Not); @@ -19053,12 +19013,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ __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_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":659 + /* "hunter/_predicates.pyx":662 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -19078,7 +19038,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":662 +/* "hunter/_predicates.pyx":665 * return hash(('Not', self.predicate)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -19115,7 +19075,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, 662, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 665, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -19126,13 +19086,13 @@ 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, 662, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 665, __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) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 665, __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 */ @@ -19153,24 +19113,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 662, 0, __PYX_ERR(0, 662, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 665, 0, __PYX_ERR(0, 665, __pyx_L1_error)); - /* "hunter/_predicates.pyx":663 + /* "hunter/_predicates.pyx":666 * * 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_TraceLine(666,0,__PYX_ERR(0, 666, __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_t_1 = __pyx_f_6hunter_11_predicates_fast_Not_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":662 + /* "hunter/_predicates.pyx":665 * return hash(('Not', self.predicate)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -19190,7 +19150,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":665 +/* "hunter/_predicates.pyx":668 * return fast_Not_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -19224,16 +19184,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 665, 0, __PYX_ERR(0, 665, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 668, 0, __PYX_ERR(0, 668, __pyx_L1_error)); - /* "hunter/_predicates.pyx":666 + /* "hunter/_predicates.pyx":669 * * 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_TraceLine(669,0,__PYX_ERR(0, 669, __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) { @@ -19247,16 +19207,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "hunter/_predicates.pyx":667 + /* "hunter/_predicates.pyx":670 * 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_TraceLine(670,0,__PYX_ERR(0, 670, __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_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __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); @@ -19264,17 +19224,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ __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_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __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_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __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 + /* "hunter/_predicates.pyx":669 * * def __or__(self, other): * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< @@ -19283,17 +19243,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ */ } - /* "hunter/_predicates.pyx":669 + /* "hunter/_predicates.pyx":672 * 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)) + __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __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_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -19301,7 +19261,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ __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_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -19309,7 +19269,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ goto __pyx_L0; } - /* "hunter/_predicates.pyx":665 + /* "hunter/_predicates.pyx":668 * return fast_Not_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -19330,7 +19290,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":671 +/* "hunter/_predicates.pyx":674 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -19364,16 +19324,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 671, 0, __PYX_ERR(0, 671, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 674, 0, __PYX_ERR(0, 674, __pyx_L1_error)); - /* "hunter/_predicates.pyx":672 + /* "hunter/_predicates.pyx":675 * * 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_TraceLine(675,0,__PYX_ERR(0, 675, __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) { @@ -19387,16 +19347,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "hunter/_predicates.pyx":673 + /* "hunter/_predicates.pyx":676 * 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_TraceLine(676,0,__PYX_ERR(0, 676, __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_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __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); @@ -19404,17 +19364,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v __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_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_Or), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 676, __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_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __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 + /* "hunter/_predicates.pyx":675 * * def __and__(self, other): * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< @@ -19423,17 +19383,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v */ } - /* "hunter/_predicates.pyx":675 + /* "hunter/_predicates.pyx":678 * 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)) + __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __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_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -19441,7 +19401,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v __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_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_11_predicates_And), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -19449,7 +19409,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v goto __pyx_L0; } - /* "hunter/_predicates.pyx":671 + /* "hunter/_predicates.pyx":674 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -19470,7 +19430,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":677 +/* "hunter/_predicates.pyx":680 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -19499,22 +19459,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 677, 0, __PYX_ERR(0, 677, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error)); - /* "hunter/_predicates.pyx":678 + /* "hunter/_predicates.pyx":681 * * 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_TraceLine(681,0,__PYX_ERR(0, 681, __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 + /* "hunter/_predicates.pyx":680 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -19888,7 +19848,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc return __pyx_r; } -/* "hunter/_predicates.pyx":680 +/* "hunter/_predicates.pyx":683 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< @@ -19907,31 +19867,31 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Not_call", 0); - __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error)); + __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 683, 0, __PYX_ERR(0, 683, __pyx_L1_error)); - /* "hunter/_predicates.pyx":681 + /* "hunter/_predicates.pyx":684 * * 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_TraceLine(684,0,__PYX_ERR(0, 684, __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_t_2 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, __pyx_v_event); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __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_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 684, __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_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":680 + /* "hunter/_predicates.pyx":683 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< @@ -19952,7 +19912,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struc return __pyx_r; } -/* "hunter/_predicates.pyx":684 +/* "hunter/_predicates.pyx":687 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< @@ -19973,36 +19933,36 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_call", 0); - __Pyx_TraceCall("fast_call", __pyx_f[0], 684, 0, __PYX_ERR(0, 684, __pyx_L1_error)); + __Pyx_TraceCall("fast_call", __pyx_f[0], 687, 0, __PYX_ERR(0, 687, __pyx_L1_error)); - /* "hunter/_predicates.pyx":685 + /* "hunter/_predicates.pyx":688 * * 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_TraceLine(688,0,__PYX_ERR(0, 688, __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 + /* "hunter/_predicates.pyx":689 * 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_TraceLine(689,0,__PYX_ERR(0, 689, __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_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, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":685 + /* "hunter/_predicates.pyx":688 * * cdef inline fast_call(callable, Event event): * if type(callable) is Query: # <<<<<<<<<<<<<< @@ -20011,34 +19971,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":687 + /* "hunter/_predicates.pyx":690 * 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_TraceLine(690,0,__PYX_ERR(0, 690, __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 + /* "hunter/_predicates.pyx":691 * 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_TraceLine(691,0,__PYX_ERR(0, 691, __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_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, 691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":687 + /* "hunter/_predicates.pyx":690 * if type(callable) is Query: * return fast_Query_call( callable, event) * elif type(callable) is Or: # <<<<<<<<<<<<<< @@ -20047,34 +20007,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":689 + /* "hunter/_predicates.pyx":692 * 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_TraceLine(692,0,__PYX_ERR(0, 692, __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 + /* "hunter/_predicates.pyx":693 * 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_TraceLine(693,0,__PYX_ERR(0, 693, __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_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, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":689 + /* "hunter/_predicates.pyx":692 * elif type(callable) is Or: * return fast_Or_call( callable, event) * elif type(callable) is And: # <<<<<<<<<<<<<< @@ -20083,34 +20043,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":691 + /* "hunter/_predicates.pyx":694 * 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_TraceLine(694,0,__PYX_ERR(0, 694, __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 + /* "hunter/_predicates.pyx":695 * 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_TraceLine(695,0,__PYX_ERR(0, 695, __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_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, 695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":691 + /* "hunter/_predicates.pyx":694 * elif type(callable) is And: * return fast_And_call( callable, event) * elif type(callable) is Not: # <<<<<<<<<<<<<< @@ -20119,34 +20079,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":693 + /* "hunter/_predicates.pyx":696 * 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_TraceLine(696,0,__PYX_ERR(0, 696, __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 + /* "hunter/_predicates.pyx":697 * 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_TraceLine(697,0,__PYX_ERR(0, 697, __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_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, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":693 + /* "hunter/_predicates.pyx":696 * elif type(callable) is Not: * return fast_Not_call( callable, event) * elif type(callable) is When: # <<<<<<<<<<<<<< @@ -20155,34 +20115,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":695 + /* "hunter/_predicates.pyx":698 * 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_TraceLine(698,0,__PYX_ERR(0, 698, __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 + /* "hunter/_predicates.pyx":699 * 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_TraceLine(699,0,__PYX_ERR(0, 699, __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_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, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":695 + /* "hunter/_predicates.pyx":698 * elif type(callable) is When: * return fast_When_call( callable, event) * elif type(callable) is From: # <<<<<<<<<<<<<< @@ -20191,34 +20151,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":697 + /* "hunter/_predicates.pyx":700 * 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_TraceLine(700,0,__PYX_ERR(0, 700, __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 + /* "hunter/_predicates.pyx":701 * 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_TraceLine(701,0,__PYX_ERR(0, 701, __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_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, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":697 + /* "hunter/_predicates.pyx":700 * elif type(callable) is From: * return fast_From_call( callable, event) * elif type(callable) is Backlog: # <<<<<<<<<<<<<< @@ -20227,12 +20187,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":700 + /* "hunter/_predicates.pyx":703 * return fast_Backlog_call( callable, event) * else: * return callable(event) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(700,0,__PYX_ERR(0, 700, __pyx_L1_error)) + __Pyx_TraceLine(703,0,__PYX_ERR(0, 703, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_callable); @@ -20248,7 +20208,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject } __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) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; @@ -20256,7 +20216,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject goto __pyx_L0; } - /* "hunter/_predicates.pyx":684 + /* "hunter/_predicates.pyx":687 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< @@ -26955,35 +26915,35 @@ static int __Pyx_modinit_type_init_code(void) { 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, 536, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 539, __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, 536, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 536, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_And, (PyObject *)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 539, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 539, __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, 588, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 591, __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, 588, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 588, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Or, (PyObject *)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 591, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 591, __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, 640, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 643, __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, 640, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 640, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Not, (PyObject *)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 643, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 643, __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, 264, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -27087,7 +27047,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, 543, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__) < 0) __PYX_ERR(0, 546, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__.tp_print = 0; #endif @@ -27095,7 +27055,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, 544, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(0, 547, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr.tp_print = 0; #endif @@ -27103,7 +27063,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, 596, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__) < 0) __PYX_ERR(0, 599, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__.tp_print = 0; #endif @@ -27111,7 +27071,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, 597, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 600, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr.tp_print = 0; #endif @@ -27579,44 +27539,44 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error)) - /* "hunter/_predicates.pyx":579 + /* "hunter/_predicates.pyx":582 * 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(579,0,__PYX_ERR(0, 579, __pyx_L1_error)) + __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error)) - /* "hunter/_predicates.pyx":632 + /* "hunter/_predicates.pyx":635 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: * if fast_call(predicate, event): */ - __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error)) + __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error)) - /* "hunter/_predicates.pyx":680 + /* "hunter/_predicates.pyx":683 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< * return not fast_call(self.predicate, event) * */ - __Pyx_TraceLine(680,0,__PYX_ERR(0, 680, __pyx_L1_error)) + __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __pyx_L1_error)) - /* "hunter/_predicates.pyx":684 + /* "hunter/_predicates.pyx":687 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< * if type(callable) is Query: * return fast_Query_call( callable, event) */ - __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __pyx_L1_error)) + __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error)) /* "(tree fragment)":1 diff --git a/src/hunter/_predicates.pyx b/src/hunter/_predicates.pyx index 00e2055..4749552 100644 --- a/src/hunter/_predicates.pyx +++ b/src/hunter/_predicates.pyx @@ -509,9 +509,7 @@ cdef inline fast_Backlog_call(Backlog self, Event event): frame = frame.f_back depth_delta += 1 for stack_event in stack_events: - if self._filter is None: - self.action(stack_event) - elif self._filter(stack_event): + if self._filter is None or self._filter(stack_event): self.action(stack_event) for backlog_event in self.queue: if self._filter is None: diff --git a/src/hunter/_tracer.c b/src/hunter/_tracer.c index 0005487..5c27567 100644 --- a/src/hunter/_tracer.c +++ b/src/hunter/_tracer.c @@ -810,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_tracer.pyx", "stringsource", "src/hunter/_tracer.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", - ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", + ".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/_event.pxd", "src/hunter/_predicates.pxd", }; @@ -829,10 +829,10 @@ struct __pyx_obj_6hunter_11_predicates_Backlog; struct __pyx_obj_6hunter_7_tracer_Tracer; struct __pyx_opt_args_6hunter_6_event_5Event_detach; -/* "_event.pxd":37 - * +/* "_event.pxd":38 * Event clone(self) - * Event detach(self, value_filter=?) # <<<<<<<<<<<<<< + * + * cpdef Event detach(self, value_filter=?) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6hunter_6_event_5Event_detach { int __pyx_n; @@ -1016,7 +1016,7 @@ struct __pyx_obj_6hunter_7_tracer_Tracer { struct __pyx_vtabstruct_6hunter_6_event_Event { struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); - struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); + struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index db93931..3f62156 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -706,9 +706,7 @@ def __call__(self, event): frame = frame.f_back depth_delta += 1 for stack_event in stack_events: - if self._filter is None: - self.action(stack_event) - elif self._filter(stack_event): + if self._filter is None or self._filter(stack_event): self.action(stack_event) for backlog_event in self.queue: if self._filter is None: diff --git a/src/hunter/util.py b/src/hunter/util.py index 33edcb7..e580fbf 100644 --- a/src/hunter/util.py +++ b/src/hunter/util.py @@ -8,6 +8,8 @@ from collections import defaultdict from collections import deque +import hunter + from .vendor.colorama import Back from .vendor.colorama import Fore from .vendor.colorama import Style @@ -194,3 +196,16 @@ def frame_iterator(frame): while frame: yield frame frame = frame.f_back + + +def convert_num_calls_to_pure_or_cython(lines): + is_not_pure = hunter.Tracer.__module__ != 'hunter.tracer' + + def inc_if_not_pure(i): + return int(i) - is_not_pure + + regex = 'calls=(\d+)' + return [ + re.sub(regex, 'calls={}'.format(inc_if_not_pure(re.search(regex, line).group(1))), line) + for line in lines + ] diff --git a/tests/test_integration.py b/tests/test_integration.py index f9e76b5..dff599b 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -24,6 +24,8 @@ from utils import DebugCallPrinter +from hunter.util import convert_num_calls_to_pure_or_cython + try: from cStringIO import StringIO except ImportError: @@ -679,9 +681,9 @@ def test_backlog_subprocess(LineMatcher): ) import re print(re.sub(r'([\[\]])', r'[\1]', output)) - # print(output) + print(output) lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines([ + lm.fnmatch_lines(convert_num_calls_to_pure_or_cython([ "depth=0 calls=1 *sample7args.py:4 call => one(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", "depth=1 calls=2 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", "depth=1 calls=2 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", @@ -730,4 +732,4 @@ def test_backlog_subprocess(LineMatcher): "depth=5 calls=17 *sample7args.py:33 line for i in range(1): # five", "depth=5 calls=17 *sample7args.py:34 line return i # five", "depth=4 calls=17 *sample7args.py:34 return <= five: 0", - ]) + ])) From 225388de1315d930aa027608c9adf6a75eeaa632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 01:39:55 +0300 Subject: [PATCH 31/38] Make both cpdef (tests don't show significant performance difference in C-to-C calls). --- src/hunter/_event.c | 113 ++-- src/hunter/_event.pxd | 3 +- src/hunter/_event.pyx | 2 +- src/hunter/_predicates.c | 1098 +++++++++++++++++++------------------- src/hunter/_tracer.c | 12 +- 5 files changed, 636 insertions(+), 592 deletions(-) diff --git a/src/hunter/_event.c b/src/hunter/_event.c index fd1cb55..172d66c 100644 --- a/src/hunter/_event.c +++ b/src/hunter/_event.c @@ -810,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_event.pyx", "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", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_tracer.pxd", }; @@ -822,9 +822,9 @@ struct __pyx_obj_6hunter_6_event_Event; struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines; struct __pyx_opt_args_6hunter_6_event_5Event_detach; -/* "hunter/_event.pxd":38 - * Event clone(self) +/* "hunter/_event.pxd":37 * + * cpdef Event clone(self) * cpdef Event detach(self, value_filter=?) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6hunter_6_event_5Event_detach { @@ -919,11 +919,11 @@ struct __pyx_obj_6hunter_6_event___pyx_scope_struct__yield_lines { */ struct __pyx_vtabstruct_6hunter_6_event_Event { - struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); + struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch); struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; -static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *); +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch); static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* --- Runtime support code (head) --- */ @@ -1724,7 +1724,7 @@ static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_detach(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); /* proto*/ -static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto*/ +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch); /* proto*/ /* Module declarations from 'cython' */ @@ -2078,6 +2078,7 @@ 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, 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_4clone(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 */ @@ -2091,15 +2092,15 @@ 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_6__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 */ static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ 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_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_8__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_6_event_5Event_10__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*/ @@ -3248,7 +3249,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_de * * return event # <<<<<<<<<<<<<< * - * cdef inline Event clone(self): + * cpdef inline Event clone(self): */ __Pyx_TraceLine(107,0,__PYX_ERR(0, 107, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); @@ -3379,12 +3380,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_2detach(struct __pyx_obj_6hunte /* "hunter/_event.pyx":109 * return event * - * cdef inline Event clone(self): # <<<<<<<<<<<<<< + * cpdef inline Event clone(self): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * event.arg = self.arg */ -static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { +static PyObject *__pyx_pw_6hunter_6_event_5Event_5clone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, CYTHON_UNUSED int __pyx_skip_dispatch) { struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = NULL; struct __pyx_obj_6hunter_6_event_Event *__pyx_r = NULL; __Pyx_TraceDeclarations @@ -3401,7 +3403,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl /* "hunter/_event.pyx":110 * - * cdef inline Event clone(self): + * cpdef inline Event clone(self): * event = Event.__new__(Event) # <<<<<<<<<<<<<< * event.arg = self.arg * event.frame = self.frame @@ -3416,7 +3418,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl __pyx_t_2 = 0; /* "hunter/_event.pyx":111 - * cdef inline Event clone(self): + * cpdef inline Event clone(self): * event = Event.__new__(Event) * event.arg = self.arg # <<<<<<<<<<<<<< * event.frame = self.frame @@ -3736,7 +3738,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl /* "hunter/_event.pyx":109 * return event * - * cdef inline Event clone(self): # <<<<<<<<<<<<<< + * cpdef inline Event clone(self): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * event.arg = self.arg */ @@ -3755,6 +3757,48 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl return __pyx_r; } +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_6_event_5Event_5clone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_5clone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("clone (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_4clone(((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_4clone(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("clone", 0); + __Pyx_TraceCall("clone (wrapper)", __pyx_f[0], 109, 0, __PYX_ERR(0, 109, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = ((PyObject *)__pyx_f_6hunter_6_event_5Event_clone(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._event.Event.clone", __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":134 * * @property @@ -7635,19 +7679,19 @@ 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_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_7__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_6__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_6__getitem__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self, PyObject *__pyx_v_item) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -7988,19 +8032,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_17threading_support___get__(str */ /* 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_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_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_8__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_8__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; @@ -8423,19 +8467,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_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_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_10__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_10__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 @@ -9900,8 +9944,9 @@ static PyObject *__pyx_getprop_6hunter_6_event_5Event_threading_support(PyObject 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}, + {"clone", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_5clone, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_9__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_11__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; @@ -9943,7 +9988,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_7__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; @@ -10490,7 +10535,7 @@ static int __Pyx_modinit_type_init_code(void) { __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- 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; + __pyx_vtable_6hunter_6_event_Event.clone = (struct __pyx_obj_6hunter_6_event_Event *(*)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch))__pyx_f_6hunter_6_event_5Event_clone; __pyx_vtable_6hunter_6_event_Event.detach = (struct __pyx_obj_6hunter_6_event_Event *(*)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args))__pyx_f_6hunter_6_event_5Event_detach; if (PyType_Ready(&__pyx_type_6hunter_6_event_Event) < 0) __PYX_ERR(0, 30, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -11197,7 +11242,7 @@ if (!__Pyx_RefNanny) { /* "hunter/_event.pyx":109 * return event * - * cdef inline Event clone(self): # <<<<<<<<<<<<<< + * cpdef inline Event clone(self): # <<<<<<<<<<<<<< * event = Event.__new__(Event) * event.arg = self.arg */ diff --git a/src/hunter/_event.pxd b/src/hunter/_event.pxd index 47d9edb..4f8daf7 100644 --- a/src/hunter/_event.pxd +++ b/src/hunter/_event.pxd @@ -33,6 +33,5 @@ cdef class Event: object _threadidn # slightly different name cause "_threadid" is a goddamn macro in Microsoft stddef.h object _threadname - Event clone(self) - + cpdef Event clone(self) cpdef Event detach(self, value_filter=?) diff --git a/src/hunter/_event.pyx b/src/hunter/_event.pyx index 639b3cd..c638532 100644 --- a/src/hunter/_event.pyx +++ b/src/hunter/_event.pyx @@ -106,7 +106,7 @@ cdef class Event: return event - cdef inline Event clone(self): + cpdef inline Event clone(self): event = Event.__new__(Event) event.arg = self.arg event.frame = self.frame diff --git a/src/hunter/_predicates.c b/src/hunter/_predicates.c index 0b71e75..c635e59 100644 --- a/src/hunter/_predicates.c +++ b/src/hunter/_predicates.c @@ -810,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_predicates.pyx", "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", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_tracer.pxd", "src/hunter/_event.pxd", }; @@ -842,9 +842,9 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__; struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr; struct __pyx_opt_args_6hunter_6_event_5Event_detach; -/* "_event.pxd":38 - * Event clone(self) +/* "_event.pxd":37 * + * cpdef Event clone(self) * cpdef Event detach(self, value_filter=?) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6hunter_6_event_5Event_detach { @@ -1147,7 +1147,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr { }; -/* "hunter/_predicates.pyx":546 +/* "hunter/_predicates.pyx":541 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1160,7 +1160,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ { }; -/* "hunter/_predicates.pyx":547 +/* "hunter/_predicates.pyx":542 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1176,7 +1176,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr { }; -/* "hunter/_predicates.pyx":599 +/* "hunter/_predicates.pyx":594 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1189,7 +1189,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ { }; -/* "hunter/_predicates.pyx":600 +/* "hunter/_predicates.pyx":595 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1215,7 +1215,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_12_genexpr { */ struct __pyx_vtabstruct_6hunter_6_event_Event { - struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); + struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch); struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; @@ -12148,7 +12148,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru */ __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, 391, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->clone(__pyx_v_event, 0)); 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; @@ -14835,8 +14835,8 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s * first_frame = first_event.frame.f_back * else: * first_frame = first_event.frame # <<<<<<<<<<<<<< - * # print(f"FIRST IS CALL {first_is_call}") - * # print(f"FIRST FRAME {first_frame}") + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full */ __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __pyx_L1_error)) /*else*/ { @@ -14847,27 +14847,27 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_L6:; - /* "hunter/_predicates.pyx":495 - * # print(f"FIRST IS CALL {first_is_call}") - * # print(f"FIRST FRAME {first_frame}") + /* "hunter/_predicates.pyx":493 + * else: + * first_frame = first_event.frame * if first_frame is not None: # <<<<<<<<<<<<<< * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame */ - __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error)) __pyx_t_3 = (((PyObject *)__pyx_v_first_frame) != Py_None); __pyx_t_8 = (__pyx_t_3 != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":496 - * # print(f"FIRST FRAME {first_frame}") + /* "hunter/_predicates.pyx":494 + * first_frame = first_event.frame * if first_frame is not None: * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full # <<<<<<<<<<<<<< * frame = first_frame * depth_delta = 0 */ - __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 496, __pyx_L1_error) + __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -14881,43 +14881,43 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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, 496, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __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":497 + /* "hunter/_predicates.pyx":495 * if first_frame is not None: * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame # <<<<<<<<<<<<<< * depth_delta = 0 * while frame and depth_delta < missing_depth: */ - __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error)) + __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) __Pyx_INCREF(((PyObject *)__pyx_v_first_frame)); __pyx_v_frame = __pyx_v_first_frame; - /* "hunter/_predicates.pyx":498 + /* "hunter/_predicates.pyx":496 * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame * depth_delta = 0 # <<<<<<<<<<<<<< * while frame and depth_delta < missing_depth: * stack_event = Event( */ - __Pyx_TraceLine(498,0,__PYX_ERR(0, 498, __pyx_L1_error)) + __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) __pyx_v_depth_delta = 0; - /* "hunter/_predicates.pyx":499 + /* "hunter/_predicates.pyx":497 * frame = first_frame * depth_delta = 0 * while frame and depth_delta < missing_depth: # <<<<<<<<<<<<<< * stack_event = Event( * frame=frame, kind='call', arg=None, */ - __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __pyx_L1_error)) + __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __pyx_L1_error)) while (1) { - __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 499, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) if (__pyx_t_3) { } else { __pyx_t_8 = __pyx_t_3; @@ -14928,81 +14928,81 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_L10_bool_binop_done:; if (!__pyx_t_8) break; - /* "hunter/_predicates.pyx":501 + /* "hunter/_predicates.pyx":499 * while 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(501,0,__PYX_ERR(0, 501, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) + __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, 501, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_kind, __pyx_n_s_call) < 0) __PYX_ERR(0, 501, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_arg, Py_None) < 0) __PYX_ERR(0, 501, __pyx_L1_error) + 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":502 + /* "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(502,0,__PYX_ERR(0, 502, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_event->threading_support); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) + __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, 501, __pyx_L1_error) + 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":503 + /* "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(503,0,__PYX_ERR(0, 503, __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, 503, __pyx_L1_error) + __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, 501, __pyx_L1_error) + 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, 501, __pyx_L1_error) + 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":500 + /* "hunter/_predicates.pyx":498 * depth_delta = 0 * while frame and depth_delta < missing_depth: * stack_event = Event( # <<<<<<<<<<<<<< * frame=frame, kind='call', arg=None, * threading_support=event.threading_support, */ - __Pyx_TraceLine(500,0,__PYX_ERR(0, 500, __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, 500, __pyx_L1_error) + __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, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_1)); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":505 + /* "hunter/_predicates.pyx":503 * depth=first_depth - depth_delta - 1, calls=-1 * ) * if not self.vars: # <<<<<<<<<<<<<< * # noinspection PyPropertyAccess * stack_event._locals = {} */ - __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error)) + __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error)) __pyx_t_8 = ((!(__pyx_v_self->vars != 0)) != 0); if (__pyx_t_8) { - /* "hunter/_predicates.pyx":507 + /* "hunter/_predicates.pyx":505 * if not self.vars: * # noinspection PyPropertyAccess * stack_event._locals = {} # <<<<<<<<<<<<<< * stack_event._globals = {} * stack_event.detached = True */ - __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_stack_event->_locals); @@ -15010,15 +15010,15 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_v_stack_event->_locals = __pyx_t_1; __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":508 + /* "hunter/_predicates.pyx":506 * # noinspection PyPropertyAccess * stack_event._locals = {} * stack_event._globals = {} # <<<<<<<<<<<<<< * stack_event.detached = True * stack_events.appendleft(stack_event) */ - __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_stack_event->_globals); @@ -15026,17 +15026,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_v_stack_event->_globals = __pyx_t_1; __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":509 + /* "hunter/_predicates.pyx":507 * stack_event._locals = {} * stack_event._globals = {} * stack_event.detached = True # <<<<<<<<<<<<<< * stack_events.appendleft(stack_event) * frame = frame.f_back */ - __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) + __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) __pyx_v_stack_event->detached = 1; - /* "hunter/_predicates.pyx":505 + /* "hunter/_predicates.pyx":503 * depth=first_depth - depth_delta - 1, calls=-1 * ) * if not self.vars: # <<<<<<<<<<<<<< @@ -15045,15 +15045,15 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ } - /* "hunter/_predicates.pyx":510 + /* "hunter/_predicates.pyx":508 * stack_event._globals = {} * stack_event.detached = True * stack_events.appendleft(stack_event) # <<<<<<<<<<<<<< * frame = frame.f_back * depth_delta += 1 */ - __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __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, 510, __pyx_L1_error) + __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __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, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15067,68 +15067,68 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_stack_event)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __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":511 + /* "hunter/_predicates.pyx":509 * stack_event.detached = True * stack_events.appendleft(stack_event) * frame = frame.f_back # <<<<<<<<<<<<<< * depth_delta += 1 * for stack_event in stack_events: */ - __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) + __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_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, 511, __pyx_L1_error) + 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":512 + /* "hunter/_predicates.pyx":510 * stack_events.appendleft(stack_event) * frame = frame.f_back * depth_delta += 1 # <<<<<<<<<<<<<< * for stack_event in stack_events: * if self._filter is None or self._filter(stack_event): */ - __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error)) + __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __pyx_L1_error)) __pyx_v_depth_delta = (__pyx_v_depth_delta + 1); } - /* "hunter/_predicates.pyx":513 + /* "hunter/_predicates.pyx":511 * frame = frame.f_back * depth_delta += 1 * for stack_event in stack_events: # <<<<<<<<<<<<<< * if self._filter is None or self._filter(stack_event): * self.action(stack_event) */ - __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error)) + __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, 513, __pyx_L1_error) + __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, 513, __pyx_L1_error) + __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, 513, __pyx_L1_error) + __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, 513, __pyx_L1_error) + __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, 513, __pyx_L1_error) + __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, 513, __pyx_L1_error) + __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 } @@ -15138,24 +15138,24 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 513, __pyx_L1_error) + else __PYX_ERR(0, 511, __pyx_L1_error) } break; } __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, 513, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2)); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":514 + /* "hunter/_predicates.pyx":512 * depth_delta += 1 * for stack_event in stack_events: * if self._filter is None or 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_TraceLine(512,0,__PYX_ERR(0, 512, __pyx_L1_error)) __pyx_t_3 = (__pyx_v_self->_filter == Py_None); __pyx_t_11 = (__pyx_t_3 != 0); if (!__pyx_t_11) { @@ -15176,23 +15176,23 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_t_11; __pyx_L16_bool_binop_done:; if (__pyx_t_8) { - /* "hunter/_predicates.pyx":515 + /* "hunter/_predicates.pyx":513 * for stack_event in stack_events: * if self._filter is None or 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_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_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -15206,12 +15206,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error) + 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":514 + /* "hunter/_predicates.pyx":512 * depth_delta += 1 * for stack_event in stack_events: * if self._filter is None or self._filter(stack_event): # <<<<<<<<<<<<<< @@ -15220,20 +15220,20 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ } - /* "hunter/_predicates.pyx":513 + /* "hunter/_predicates.pyx":511 * frame = frame.f_back * depth_delta += 1 * for stack_event in stack_events: # <<<<<<<<<<<<<< * if self._filter is None or self._filter(stack_event): * self.action(stack_event) */ - __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error)) + __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":495 - * # print(f"FIRST IS CALL {first_is_call}") - * # print(f"FIRST FRAME {first_frame}") + /* "hunter/_predicates.pyx":493 + * else: + * first_frame = first_event.frame * if first_frame is not None: # <<<<<<<<<<<<<< * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full * frame = first_frame @@ -15249,38 +15249,38 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ } - /* "hunter/_predicates.pyx":516 + /* "hunter/_predicates.pyx":514 * if self._filter is None or 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_TraceLine(514,0,__PYX_ERR(0, 514, __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_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->queue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __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) + __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 514, __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) + __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, 514, __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_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __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) + __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, 514, __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_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -15290,7 +15290,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s 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) + else __PYX_ERR(0, 514, __pyx_L1_error) } break; } @@ -15299,26 +15299,26 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __Pyx_XDECREF_SET(__pyx_v_backlog_event, __pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":517 + /* "hunter/_predicates.pyx":515 * 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_TraceLine(515,0,__PYX_ERR(0, 515, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_self->_filter == Py_None); __pyx_t_11 = (__pyx_t_8 != 0); if (__pyx_t_11) { - /* "hunter/_predicates.pyx":518 + /* "hunter/_predicates.pyx":516 * 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_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->action); __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -15332,12 +15332,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __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 + /* "hunter/_predicates.pyx":515 * self.action(stack_event) * for backlog_event in self.queue: * if self._filter is None: # <<<<<<<<<<<<<< @@ -15347,14 +15347,14 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s goto __pyx_L20; } - /* "hunter/_predicates.pyx":519 + /* "hunter/_predicates.pyx":517 * 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_TraceLine(517,0,__PYX_ERR(0, 517, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_self->_filter); __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -15368,21 +15368,21 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_11) { - /* "hunter/_predicates.pyx":520 + /* "hunter/_predicates.pyx":518 * 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_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_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -15396,12 +15396,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error) + 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":519 + /* "hunter/_predicates.pyx":517 * if self._filter is None: * self.action(backlog_event) * elif self._filter(backlog_event): # <<<<<<<<<<<<<< @@ -15411,26 +15411,26 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_L20:; - /* "hunter/_predicates.pyx":516 + /* "hunter/_predicates.pyx":514 * if self._filter is None or 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_TraceLine(514,0,__PYX_ERR(0, 514, __pyx_L1_error)) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":521 + /* "hunter/_predicates.pyx":519 * 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_TraceLine(519,0,__PYX_ERR(0, 519, __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, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15444,7 +15444,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __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; @@ -15468,14 +15468,14 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s goto __pyx_L3; } - /* "hunter/_predicates.pyx":523 + /* "hunter/_predicates.pyx":521 * 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)) + __Pyx_TraceLine(521,0,__PYX_ERR(0, 521, __pyx_L1_error)) /*else*/ { __pyx_t_8 = (__pyx_v_self->strip != 0); if (__pyx_t_8) { @@ -15488,15 +15488,15 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_L22_bool_binop_done:; if (__pyx_t_11) { - /* "hunter/_predicates.pyx":526 + /* "hunter/_predicates.pyx":524 * # 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): - * # print(f"PRE DETACH EVENT FRAME {event.frame}") + * 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_TraceLine(524,0,__PYX_ERR(0, 524, __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, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -15510,12 +15510,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __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 + /* "hunter/_predicates.pyx":521 * self.queue.clear() * else: * if self.strip and event.depth < 1: # <<<<<<<<<<<<<< @@ -15524,14 +15524,14 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s */ } - /* "hunter/_predicates.pyx":527 + /* "hunter/_predicates.pyx":525 * # 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): # <<<<<<<<<<<<<< - * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.frame = event.frame */ - __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error)) + __Pyx_TraceLine(525,0,__PYX_ERR(0, 525, __pyx_L1_error)) __pyx_t_8 = (__pyx_v_self->_filter == Py_None); __pyx_t_3 = (__pyx_t_8 != 0); if (!__pyx_t_3) { @@ -15552,25 +15552,25 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __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) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = __pyx_t_3; __pyx_L25_bool_binop_done:; if (__pyx_t_11) { - /* "hunter/_predicates.pyx":529 + /* "hunter/_predicates.pyx":526 + * self.queue.clear() * if self._filter is None or self._filter(event): - * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) # <<<<<<<<<<<<<< * detached_event.frame = event.frame - * # print(f"EVENT FRAME {event.frame}") + * self.queue.append(detached_event) */ - __Pyx_TraceLine(529,0,__PYX_ERR(0, 529, __pyx_L1_error)) + __Pyx_TraceLine(526,0,__PYX_ERR(0, 526, __pyx_L1_error)) if ((__pyx_v_self->vars != 0)) { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -15580,20 +15580,20 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s } __pyx_t_13.__pyx_n = 1; __pyx_t_13.value_filter = __pyx_t_1; - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, 0, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, 0, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_detached_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":530 - * # print(f"PRE DETACH EVENT FRAME {event.frame}") + /* "hunter/_predicates.pyx":527 + * 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 # <<<<<<<<<<<<<< - * # print(f"EVENT FRAME {event.frame}") - * # print(f"DETACHED FRAME {detached_event.frame}") + * self.queue.append(detached_event) + * */ - __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) + __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error)) __pyx_t_2 = ((PyObject *)__pyx_v_event->frame); __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -15602,35 +15602,35 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s __pyx_v_detached_event->frame = ((PyFrameObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":533 - * # print(f"EVENT FRAME {event.frame}") - * # print(f"DETACHED FRAME {detached_event.frame}") + /* "hunter/_predicates.pyx":528 + * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.frame = event.frame * self.queue.append(detached_event) # <<<<<<<<<<<<<< * * return result */ - __Pyx_TraceLine(533,0,__PYX_ERR(0, 533, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 533, __pyx_L1_error) + __Pyx_TraceLine(528,0,__PYX_ERR(0, 528, __pyx_L1_error)) + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 528, __pyx_L1_error) - /* "hunter/_predicates.pyx":527 + /* "hunter/_predicates.pyx":525 * # 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): # <<<<<<<<<<<<<< - * # print(f"PRE DETACH EVENT FRAME {event.frame}") * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.frame = event.frame */ } } __pyx_L3:; - /* "hunter/_predicates.pyx":535 + /* "hunter/_predicates.pyx":530 * self.queue.append(detached_event) * * return result # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(535,0,__PYX_ERR(0, 535, __pyx_L1_error)) + __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); __pyx_r = __pyx_v_result; @@ -15667,7 +15667,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s return __pyx_r; } -/* "hunter/_predicates.pyx":543 +/* "hunter/_predicates.pyx":538 * `And` predicate. Exits at the first sub-predicate that returns ``False``. * """ * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -15701,23 +15701,23 @@ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 543, 0, __PYX_ERR(0, 543, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 538, 0, __PYX_ERR(0, 538, __pyx_L1_error)); - /* "hunter/_predicates.pyx":544 + /* "hunter/_predicates.pyx":539 * """ * def __init__(self, *predicates): * self.predicates = predicates # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(544,0,__PYX_ERR(0, 544, __pyx_L1_error)) + __Pyx_TraceLine(539,0,__PYX_ERR(0, 539, __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":543 + /* "hunter/_predicates.pyx":538 * `And` predicate. Exits at the first sub-predicate that returns ``False``. * """ * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -15737,7 +15737,7 @@ static int __pyx_pf_6hunter_11_predicates_3And___init__(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_predicates.pyx":546 +/* "hunter/_predicates.pyx":541 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -15759,7 +15759,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3And_3__str__(PyObject *__pyx_v_ } 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":547 +/* "hunter/_predicates.pyx":542 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -15779,7 +15779,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_7__str___genexpr(PyObject * 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, 547, __pyx_L1_error) + __PYX_ERR(0, 542, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -15787,7 +15787,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_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_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, 547, __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, 542, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -15816,7 +15816,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 547, 0, __PYX_ERR(0, 547, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; @@ -15826,26 +15826,26 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 547, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 547, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 542, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 542, __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, 547, __pyx_L1_error) + __PYX_ERR(0, 542, __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, 547, __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, 542, __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, 547, __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, 542, __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, 547, __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, 542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -15864,7 +15864,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__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, 547, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 542, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -15888,7 +15888,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_3And_7__str___2generator5(__pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":546 +/* "hunter/_predicates.pyx":541 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -15911,37 +15911,37 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6 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, 546, __pyx_L1_error) + __PYX_ERR(0, 541, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__str__", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 541, 0, __PYX_ERR(0, 541, __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":547 + /* "hunter/_predicates.pyx":542 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(547,0,__PYX_ERR(0, 547, __pyx_L1_error)) + __Pyx_TraceLine(542,0,__PYX_ERR(0, 542, __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, 547, __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, 542, __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, 547, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __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, 547, __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, 542, __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":546 + /* "hunter/_predicates.pyx":541 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -15963,7 +15963,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_2__str__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":549 +/* "hunter/_predicates.pyx":544 * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -15994,30 +15994,30 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 549, 0, __PYX_ERR(0, 549, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error)); - /* "hunter/_predicates.pyx":550 + /* "hunter/_predicates.pyx":545 * * def __repr__(self): * return '' % (self.predicates,) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __pyx_L1_error)) + __Pyx_TraceLine(545,0,__PYX_ERR(0, 545, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __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, 550, __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, 545, __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":549 + /* "hunter/_predicates.pyx":544 * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16038,7 +16038,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":552 +/* "hunter/_predicates.pyx":547 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -16070,45 +16070,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 552, 0, __PYX_ERR(0, 552, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 547, 0, __PYX_ERR(0, 547, __pyx_L1_error)); - /* "hunter/_predicates.pyx":553 + /* "hunter/_predicates.pyx":548 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, And) * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(553,0,__PYX_ERR(0, 553, __pyx_L1_error)) + __Pyx_TraceLine(548,0,__PYX_ERR(0, 548, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":554 + /* "hunter/_predicates.pyx":549 * def __eq__(self, other): * return ( * isinstance(other, And) # <<<<<<<<<<<<<< * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __pyx_L1_error)) + __Pyx_TraceLine(549,0,__PYX_ERR(0, 549, __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, 554, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __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":555 + /* "hunter/_predicates.pyx":550 * return ( * isinstance(other, And) * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(555,0,__PYX_ERR(0, 555, __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, 555, __pyx_L1_error) + __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __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, 550, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -16117,7 +16117,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":552 + /* "hunter/_predicates.pyx":547 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -16138,7 +16138,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":558 +/* "hunter/_predicates.pyx":553 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -16169,17 +16169,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 558, 0, __PYX_ERR(0, 558, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 553, 0, __PYX_ERR(0, 553, __pyx_L1_error)); - /* "hunter/_predicates.pyx":559 + /* "hunter/_predicates.pyx":554 * * def __hash__(self): * return hash(('And', self.predicates)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(559,0,__PYX_ERR(0, 559, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) + __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_And); __Pyx_GIVEREF(__pyx_n_s_And); @@ -16187,12 +16187,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ __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, 559, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":558 + /* "hunter/_predicates.pyx":553 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -16212,7 +16212,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3And_8__hash__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":561 +/* "hunter/_predicates.pyx":556 * return hash(('And', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -16249,7 +16249,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3And_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, 561, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 556, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -16260,13 +16260,13 @@ static PyObject *__pyx_pw_6hunter_11_predicates_3And_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, 561, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 556, __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, 561, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 556, __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 */ @@ -16287,24 +16287,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 561, 0, __PYX_ERR(0, 561, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 556, 0, __PYX_ERR(0, 556, __pyx_L1_error)); - /* "hunter/_predicates.pyx":562 + /* "hunter/_predicates.pyx":557 * * def __call__(self, Event event): * return fast_And_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error)) + __Pyx_TraceLine(557,0,__PYX_ERR(0, 557, __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, 562, __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, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":561 + /* "hunter/_predicates.pyx":556 * return hash(('And', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -16324,7 +16324,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":564 +/* "hunter/_predicates.pyx":559 * return fast_And_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -16355,18 +16355,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 564, 0, __PYX_ERR(0, 564, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 559, 0, __PYX_ERR(0, 559, __pyx_L1_error)); - /* "hunter/_predicates.pyx":565 + /* "hunter/_predicates.pyx":560 * * def __or__(self, other): * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __pyx_L1_error)) + __Pyx_TraceLine(560,0,__PYX_ERR(0, 560, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -16374,14 +16374,14 @@ 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, 565, __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, 560, __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":564 + /* "hunter/_predicates.pyx":559 * return fast_And_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -16402,7 +16402,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_12__or__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":567 +/* "hunter/_predicates.pyx":562 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -16437,34 +16437,34 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 567, 0, __PYX_ERR(0, 567, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 562, 0, __PYX_ERR(0, 562, __pyx_L1_error)); - /* "hunter/_predicates.pyx":569 + /* "hunter/_predicates.pyx":564 * def __and__(self, other): * cdef list predicates * if type(self) is And: # <<<<<<<<<<<<<< * predicates = list((self).predicates) * else: */ - __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __pyx_L1_error)) + __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __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":570 + /* "hunter/_predicates.pyx":565 * cdef list predicates * if type(self) is And: * predicates = list((self).predicates) # <<<<<<<<<<<<<< * else: * predicates = [self] */ - __Pyx_TraceLine(570,0,__PYX_ERR(0, 570, __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, 570, __pyx_L1_error) + __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __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, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_predicates = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":569 + /* "hunter/_predicates.pyx":564 * def __and__(self, other): * cdef list predicates * if type(self) is And: # <<<<<<<<<<<<<< @@ -16474,16 +16474,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v goto __pyx_L3; } - /* "hunter/_predicates.pyx":572 + /* "hunter/_predicates.pyx":567 * predicates = list((self).predicates) * else: * predicates = [self] # <<<<<<<<<<<<<< * if isinstance(other, And): * predicates.extend(( other).predicates) */ - __Pyx_TraceLine(572,0,__PYX_ERR(0, 572, __pyx_L1_error)) + __Pyx_TraceLine(567,0,__PYX_ERR(0, 567, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -16493,32 +16493,32 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v } __pyx_L3:; - /* "hunter/_predicates.pyx":573 + /* "hunter/_predicates.pyx":568 * else: * predicates = [self] * if isinstance(other, And): # <<<<<<<<<<<<<< * predicates.extend(( other).predicates) * else: */ - __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __pyx_L1_error)) + __Pyx_TraceLine(568,0,__PYX_ERR(0, 568, __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":574 + /* "hunter/_predicates.pyx":569 * predicates = [self] * if isinstance(other, And): * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< * else: * predicates.append(other) */ - __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __pyx_L1_error)) + __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __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, 574, __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, 569, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":573 + /* "hunter/_predicates.pyx":568 * else: * predicates = [self] * if isinstance(other, And): # <<<<<<<<<<<<<< @@ -16528,38 +16528,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v goto __pyx_L4; } - /* "hunter/_predicates.pyx":576 + /* "hunter/_predicates.pyx":571 * predicates.extend(( other).predicates) * else: * predicates.append(other) # <<<<<<<<<<<<<< * return And(*predicates) * */ - __Pyx_TraceLine(576,0,__PYX_ERR(0, 576, __pyx_L1_error)) + __Pyx_TraceLine(571,0,__PYX_ERR(0, 571, __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, 576, __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, 571, __pyx_L1_error) } __pyx_L4:; - /* "hunter/_predicates.pyx":577 + /* "hunter/_predicates.pyx":572 * else: * predicates.append(other) * return And(*predicates) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __pyx_L1_error)) + __Pyx_TraceLine(572,0,__PYX_ERR(0, 572, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __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, 577, __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, 572, __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":567 + /* "hunter/_predicates.pyx":562 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -16581,7 +16581,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_14__and__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":579 +/* "hunter/_predicates.pyx":574 * return And(*predicates) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -16611,24 +16611,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 574, 0, __PYX_ERR(0, 574, __pyx_L1_error)); - /* "hunter/_predicates.pyx":580 + /* "hunter/_predicates.pyx":575 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef inline fast_And_call(And self, Event event): */ - __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error)) + __Pyx_TraceLine(575,0,__PYX_ERR(0, 575, __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, 580, __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, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":579 + /* "hunter/_predicates.pyx":574 * return And(*predicates) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -17003,7 +17003,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_20__setstate_cython__(struc return __pyx_r; } -/* "hunter/_predicates.pyx":582 +/* "hunter/_predicates.pyx":577 * return Not(self) * * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< @@ -17025,62 +17025,62 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_And_call", 0); - __Pyx_TraceCall("fast_And_call", __pyx_f[0], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error)); + __Pyx_TraceCall("fast_And_call", __pyx_f[0], 577, 0, __PYX_ERR(0, 577, __pyx_L1_error)); - /* "hunter/_predicates.pyx":583 + /* "hunter/_predicates.pyx":578 * * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if not fast_call(predicate, event): * return False */ - __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) + __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error)) if (unlikely(__pyx_v_self->predicates == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 583, __pyx_L1_error) + __PYX_ERR(0, 578, __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, 583, __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, 578, __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, 583, __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, 578, __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":584 + /* "hunter/_predicates.pyx":579 * 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(584,0,__PYX_ERR(0, 584, __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, 584, __pyx_L1_error) + __Pyx_TraceLine(579,0,__PYX_ERR(0, 579, __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, 579, __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, 584, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 579, __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":585 + /* "hunter/_predicates.pyx":580 * for predicate in self.predicates: * if not fast_call(predicate, event): * return False # <<<<<<<<<<<<<< * else: * return True */ - __Pyx_TraceLine(585,0,__PYX_ERR(0, 585, __pyx_L1_error)) + __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __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":584 + /* "hunter/_predicates.pyx":579 * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: * if not fast_call(predicate, event): # <<<<<<<<<<<<<< @@ -17089,25 +17089,25 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc */ } - /* "hunter/_predicates.pyx":583 + /* "hunter/_predicates.pyx":578 * * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if not fast_call(predicate, event): * return False */ - __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) + __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error)) } /*else*/ { - /* "hunter/_predicates.pyx":587 + /* "hunter/_predicates.pyx":582 * return False * else: * return True # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(587,0,__PYX_ERR(0, 587, __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; @@ -17115,17 +17115,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc goto __pyx_L0; } - /* "hunter/_predicates.pyx":583 + /* "hunter/_predicates.pyx":578 * * cdef inline fast_And_call(And self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if not fast_call(predicate, event): * return False */ - __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) + __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error)) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":582 + /* "hunter/_predicates.pyx":577 * return Not(self) * * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< @@ -17147,7 +17147,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_And_call(struc return __pyx_r; } -/* "hunter/_predicates.pyx":596 +/* "hunter/_predicates.pyx":591 * """ * * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -17181,23 +17181,23 @@ static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 596, 0, __PYX_ERR(0, 596, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 591, 0, __PYX_ERR(0, 591, __pyx_L1_error)); - /* "hunter/_predicates.pyx":597 + /* "hunter/_predicates.pyx":592 * * def __init__(self, *predicates): * self.predicates = predicates # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(597,0,__PYX_ERR(0, 597, __pyx_L1_error)) + __Pyx_TraceLine(592,0,__PYX_ERR(0, 592, __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":596 + /* "hunter/_predicates.pyx":591 * """ * * def __init__(self, *predicates): # <<<<<<<<<<<<<< @@ -17217,7 +17217,7 @@ static int __pyx_pf_6hunter_11_predicates_2Or___init__(struct __pyx_obj_6hunter_ return __pyx_r; } -/* "hunter/_predicates.pyx":599 +/* "hunter/_predicates.pyx":594 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -17239,7 +17239,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_2Or_3__str__(PyObject *__pyx_v_s } 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":600 +/* "hunter/_predicates.pyx":595 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -17259,7 +17259,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_7__str___genexpr(PyObject *_ 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, 600, __pyx_L1_error) + __PYX_ERR(0, 595, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -17267,7 +17267,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_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_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, 600, __pyx_L1_error) + __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, 595, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -17296,7 +17296,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 600, 0, __PYX_ERR(0, 600, __pyx_L1_error)); + __Pyx_TraceCall("genexpr", __pyx_f[0], 595, 0, __PYX_ERR(0, 595, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; @@ -17306,26 +17306,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, 600, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 600, __pyx_L1_error) } + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 595, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 595, __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, 600, __pyx_L1_error) + __PYX_ERR(0, 595, __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, 600, __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, 595, __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, 600, __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, 595, __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, 600, __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, 595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -17344,7 +17344,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, 600, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 595, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -17368,7 +17368,7 @@ static PyObject *__pyx_gb_6hunter_11_predicates_2Or_7__str___2generator6(__pyx_C return __pyx_r; } -/* "hunter/_predicates.pyx":599 +/* "hunter/_predicates.pyx":594 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -17391,37 +17391,37 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h 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, 599, __pyx_L1_error) + __PYX_ERR(0, 594, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } - __Pyx_TraceCall("__str__", __pyx_f[0], 599, 0, __PYX_ERR(0, 599, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 594, 0, __PYX_ERR(0, 594, __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":600 + /* "hunter/_predicates.pyx":595 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(600,0,__PYX_ERR(0, 600, __pyx_L1_error)) + __Pyx_TraceLine(595,0,__PYX_ERR(0, 595, __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, 600, __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, 595, __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, 600, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __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, 600, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Or_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __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":599 + /* "hunter/_predicates.pyx":594 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -17443,7 +17443,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_2__str__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":602 +/* "hunter/_predicates.pyx":597 * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -17474,30 +17474,30 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 597, 0, __PYX_ERR(0, 597, __pyx_L1_error)); - /* "hunter/_predicates.pyx":603 + /* "hunter/_predicates.pyx":598 * * def __repr__(self): * return '' % (self.predicates,) # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) + __Pyx_TraceLine(598,0,__PYX_ERR(0, 598, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __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, 603, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_hunter__predicates_Or_predicate, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __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":602 + /* "hunter/_predicates.pyx":597 * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -17518,7 +17518,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":605 +/* "hunter/_predicates.pyx":600 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -17550,45 +17550,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 605, 0, __PYX_ERR(0, 605, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 600, 0, __PYX_ERR(0, 600, __pyx_L1_error)); - /* "hunter/_predicates.pyx":606 + /* "hunter/_predicates.pyx":601 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, Or) * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(606,0,__PYX_ERR(0, 606, __pyx_L1_error)) + __Pyx_TraceLine(601,0,__PYX_ERR(0, 601, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":607 + /* "hunter/_predicates.pyx":602 * def __eq__(self, other): * return ( * isinstance(other, Or) # <<<<<<<<<<<<<< * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __pyx_L1_error)) + __Pyx_TraceLine(602,0,__PYX_ERR(0, 602, __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, 607, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __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":608 + /* "hunter/_predicates.pyx":603 * return ( * isinstance(other, Or) * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(608,0,__PYX_ERR(0, 608, __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, 608, __pyx_L1_error) + __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __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, 603, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -17597,7 +17597,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":605 + /* "hunter/_predicates.pyx":600 * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -17618,7 +17618,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu return __pyx_r; } -/* "hunter/_predicates.pyx":611 +/* "hunter/_predicates.pyx":606 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -17649,17 +17649,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 606, 0, __PYX_ERR(0, 606, __pyx_L1_error)); - /* "hunter/_predicates.pyx":612 + /* "hunter/_predicates.pyx":607 * * def __hash__(self): * return hash(('Or', self.predicates)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(612,0,__PYX_ERR(0, 612, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Or); __Pyx_GIVEREF(__pyx_n_s_Or); @@ -17667,12 +17667,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 __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, 612, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":611 + /* "hunter/_predicates.pyx":606 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -17692,7 +17692,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_2Or_8__hash__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":614 +/* "hunter/_predicates.pyx":609 * return hash(('Or', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -17729,7 +17729,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, 614, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 609, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -17740,13 +17740,13 @@ 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, 614, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 609, __pyx_L3_error) __pyx_L3_error:; __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, 614, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 609, __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 */ @@ -17767,24 +17767,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error)); - /* "hunter/_predicates.pyx":615 + /* "hunter/_predicates.pyx":610 * * def __call__(self, Event event): * return fast_Or_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __pyx_L1_error)) + __Pyx_TraceLine(610,0,__PYX_ERR(0, 610, __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, 615, __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, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":614 + /* "hunter/_predicates.pyx":609 * return hash(('Or', self.predicates)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -17804,7 +17804,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10__call__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":617 +/* "hunter/_predicates.pyx":612 * return fast_Or_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -17839,34 +17839,34 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 617, 0, __PYX_ERR(0, 617, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 612, 0, __PYX_ERR(0, 612, __pyx_L1_error)); - /* "hunter/_predicates.pyx":619 + /* "hunter/_predicates.pyx":614 * def __or__(self, other): * cdef list predicates * if type(self) is Or: # <<<<<<<<<<<<<< * predicates = list(( self).predicates) * else: */ - __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error)) + __Pyx_TraceLine(614,0,__PYX_ERR(0, 614, __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":620 + /* "hunter/_predicates.pyx":615 * cdef list predicates * if type(self) is Or: * predicates = list(( self).predicates) # <<<<<<<<<<<<<< * else: * predicates = [self] */ - __Pyx_TraceLine(620,0,__PYX_ERR(0, 620, __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, 620, __pyx_L1_error) + __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __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, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_predicates = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":619 + /* "hunter/_predicates.pyx":614 * def __or__(self, other): * cdef list predicates * if type(self) is Or: # <<<<<<<<<<<<<< @@ -17876,16 +17876,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s goto __pyx_L3; } - /* "hunter/_predicates.pyx":622 + /* "hunter/_predicates.pyx":617 * predicates = list(( self).predicates) * else: * predicates = [self] # <<<<<<<<<<<<<< * if type(other) is Or: * predicates.extend(( other).predicates) */ - __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error)) + __Pyx_TraceLine(617,0,__PYX_ERR(0, 617, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -17895,32 +17895,32 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s } __pyx_L3:; - /* "hunter/_predicates.pyx":623 + /* "hunter/_predicates.pyx":618 * else: * predicates = [self] * if type(other) is Or: # <<<<<<<<<<<<<< * predicates.extend(( other).predicates) * else: */ - __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error)) + __Pyx_TraceLine(618,0,__PYX_ERR(0, 618, __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":624 + /* "hunter/_predicates.pyx":619 * predicates = [self] * if type(other) is Or: * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< * else: * predicates.append(other) */ - __Pyx_TraceLine(624,0,__PYX_ERR(0, 624, __pyx_L1_error)) + __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __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, 624, __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, 619, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":623 + /* "hunter/_predicates.pyx":618 * else: * predicates = [self] * if type(other) is Or: # <<<<<<<<<<<<<< @@ -17930,38 +17930,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s goto __pyx_L4; } - /* "hunter/_predicates.pyx":626 + /* "hunter/_predicates.pyx":621 * predicates.extend(( other).predicates) * else: * predicates.append(other) # <<<<<<<<<<<<<< * return Or(*predicates) * */ - __Pyx_TraceLine(626,0,__PYX_ERR(0, 626, __pyx_L1_error)) + __Pyx_TraceLine(621,0,__PYX_ERR(0, 621, __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, 626, __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, 621, __pyx_L1_error) } __pyx_L4:; - /* "hunter/_predicates.pyx":627 + /* "hunter/_predicates.pyx":622 * else: * predicates.append(other) * return Or(*predicates) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error)) + __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __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, 627, __pyx_L1_error) + __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, 622, __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":617 + /* "hunter/_predicates.pyx":612 * return fast_Or_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -17983,7 +17983,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s return __pyx_r; } -/* "hunter/_predicates.pyx":629 +/* "hunter/_predicates.pyx":624 * return Or(*predicates) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -18014,18 +18014,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 629, 0, __PYX_ERR(0, 629, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __pyx_L1_error)); - /* "hunter/_predicates.pyx":630 + /* "hunter/_predicates.pyx":625 * * def __and__(self, other): * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) + __Pyx_TraceLine(625,0,__PYX_ERR(0, 625, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -18033,14 +18033,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(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_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __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, 625, __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":629 + /* "hunter/_predicates.pyx":624 * return Or(*predicates) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -18061,7 +18061,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":632 +/* "hunter/_predicates.pyx":627 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -18091,24 +18091,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 627, 0, __PYX_ERR(0, 627, __pyx_L1_error)); - /* "hunter/_predicates.pyx":633 + /* "hunter/_predicates.pyx":628 * * def __invert__(self): * return Not(self) # <<<<<<<<<<<<<< * * cdef inline fast_Or_call(Or self, Event event): */ - __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __pyx_L1_error)) + __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __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, 633, __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, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":632 + /* "hunter/_predicates.pyx":627 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -18483,7 +18483,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct return __pyx_r; } -/* "hunter/_predicates.pyx":635 +/* "hunter/_predicates.pyx":630 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< @@ -18504,61 +18504,61 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Or_call", 0); - __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 635, 0, __PYX_ERR(0, 635, __pyx_L1_error)); + __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 630, 0, __PYX_ERR(0, 630, __pyx_L1_error)); - /* "hunter/_predicates.pyx":636 + /* "hunter/_predicates.pyx":631 * * cdef inline fast_Or_call(Or self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if fast_call(predicate, event): * return True */ - __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) + __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) if (unlikely(__pyx_v_self->predicates == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 636, __pyx_L1_error) + __PYX_ERR(0, 631, __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, 636, __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, 631, __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, 636, __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, 631, __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":637 + /* "hunter/_predicates.pyx":632 * cdef inline fast_Or_call(Or self, Event event): * for predicate in self.predicates: * if fast_call(predicate, event): # <<<<<<<<<<<<<< * return True * else: */ - __Pyx_TraceLine(637,0,__PYX_ERR(0, 637, __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, 637, __pyx_L1_error) + __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __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, 632, __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, 637, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "hunter/_predicates.pyx":638 + /* "hunter/_predicates.pyx":633 * for predicate in self.predicates: * if fast_call(predicate, event): * return True # <<<<<<<<<<<<<< * else: * return False */ - __Pyx_TraceLine(638,0,__PYX_ERR(0, 638, __pyx_L1_error)) + __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __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":637 + /* "hunter/_predicates.pyx":632 * cdef inline fast_Or_call(Or self, Event event): * for predicate in self.predicates: * if fast_call(predicate, event): # <<<<<<<<<<<<<< @@ -18567,25 +18567,25 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct */ } - /* "hunter/_predicates.pyx":636 + /* "hunter/_predicates.pyx":631 * * cdef inline fast_Or_call(Or self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if fast_call(predicate, event): * return True */ - __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) + __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) } /*else*/ { - /* "hunter/_predicates.pyx":640 + /* "hunter/_predicates.pyx":635 * return True * else: * return False # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(640,0,__PYX_ERR(0, 640, __pyx_L1_error)) + __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_False); __pyx_r = Py_False; @@ -18593,17 +18593,17 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct goto __pyx_L0; } - /* "hunter/_predicates.pyx":636 + /* "hunter/_predicates.pyx":631 * * cdef inline fast_Or_call(Or self, Event event): * for predicate in self.predicates: # <<<<<<<<<<<<<< * if fast_call(predicate, event): * return True */ - __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error)) + __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":635 + /* "hunter/_predicates.pyx":630 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< @@ -18625,7 +18625,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Or_call(struct return __pyx_r; } -/* "hunter/_predicates.pyx":647 +/* "hunter/_predicates.pyx":642 * `Not` predicate. * """ * def __init__(self, predicate): # <<<<<<<<<<<<<< @@ -18662,7 +18662,7 @@ static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, 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, 647, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 642, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -18673,7 +18673,7 @@ static int __pyx_pw_6hunter_11_predicates_3Not_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 647, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 642, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("hunter._predicates.Not.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18694,23 +18694,23 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 647, 0, __PYX_ERR(0, 647, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 642, 0, __PYX_ERR(0, 642, __pyx_L1_error)); - /* "hunter/_predicates.pyx":648 + /* "hunter/_predicates.pyx":643 * """ * def __init__(self, predicate): * self.predicate = predicate # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __pyx_L1_error)) + __Pyx_TraceLine(643,0,__PYX_ERR(0, 643, __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":647 + /* "hunter/_predicates.pyx":642 * `Not` predicate. * """ * def __init__(self, predicate): # <<<<<<<<<<<<<< @@ -18730,7 +18730,7 @@ static int __pyx_pf_6hunter_11_predicates_3Not___init__(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_predicates.pyx":650 +/* "hunter/_predicates.pyx":645 * self.predicate = predicate * * def __str__(self): # <<<<<<<<<<<<<< @@ -18760,24 +18760,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error)); + __Pyx_TraceCall("__str__", __pyx_f[0], 645, 0, __PYX_ERR(0, 645, __pyx_L1_error)); - /* "hunter/_predicates.pyx":651 + /* "hunter/_predicates.pyx":646 * * def __str__(self): * return 'Not(%s)' % self.predicate # <<<<<<<<<<<<<< * * def __repr__(self): */ - __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error)) + __Pyx_TraceLine(646,0,__PYX_ERR(0, 646, __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, 651, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Not_s, __pyx_v_self->predicate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":650 + /* "hunter/_predicates.pyx":645 * self.predicate = predicate * * def __str__(self): # <<<<<<<<<<<<<< @@ -18797,7 +18797,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":653 +/* "hunter/_predicates.pyx":648 * return 'Not(%s)' % self.predicate * * def __repr__(self): # <<<<<<<<<<<<<< @@ -18827,24 +18827,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 653, 0, __PYX_ERR(0, 653, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 648, 0, __PYX_ERR(0, 648, __pyx_L1_error)); - /* "hunter/_predicates.pyx":654 + /* "hunter/_predicates.pyx":649 * * def __repr__(self): * return '' % self.predicate # <<<<<<<<<<<<<< * * def __eq__(self, other): */ - __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __pyx_L1_error)) + __Pyx_TraceLine(649,0,__PYX_ERR(0, 649, __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, 654, __pyx_L1_error) + __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, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":653 + /* "hunter/_predicates.pyx":648 * return 'Not(%s)' % self.predicate * * def __repr__(self): # <<<<<<<<<<<<<< @@ -18864,7 +18864,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":656 +/* "hunter/_predicates.pyx":651 * return '' % self.predicate * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -18896,45 +18896,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 656, 0, __PYX_ERR(0, 656, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 651, 0, __PYX_ERR(0, 651, __pyx_L1_error)); - /* "hunter/_predicates.pyx":657 + /* "hunter/_predicates.pyx":652 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< * isinstance(other, Not) * and self.predicate == ( other).predicate */ - __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error)) + __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":658 + /* "hunter/_predicates.pyx":653 * def __eq__(self, other): * return ( * isinstance(other, Not) # <<<<<<<<<<<<<< * and self.predicate == ( other).predicate * ) */ - __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error)) + __Pyx_TraceLine(653,0,__PYX_ERR(0, 653, __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, 658, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __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":659 + /* "hunter/_predicates.pyx":654 * return ( * isinstance(other, Not) * and self.predicate == ( other).predicate # <<<<<<<<<<<<<< * ) * */ - __Pyx_TraceLine(659,0,__PYX_ERR(0, 659, __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, 659, __pyx_L1_error) + __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __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, 654, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18943,7 +18943,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":656 + /* "hunter/_predicates.pyx":651 * return '' % self.predicate * * def __eq__(self, other): # <<<<<<<<<<<<<< @@ -18964,7 +18964,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":662 +/* "hunter/_predicates.pyx":657 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -18995,17 +18995,17 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 662, 0, __PYX_ERR(0, 662, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 657, 0, __PYX_ERR(0, 657, __pyx_L1_error)); - /* "hunter/_predicates.pyx":663 + /* "hunter/_predicates.pyx":658 * * def __hash__(self): * return hash(('Not', self.predicate)) # <<<<<<<<<<<<<< * * def __call__(self, Event event): */ - __Pyx_TraceLine(663,0,__PYX_ERR(0, 663, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Not); __Pyx_GIVEREF(__pyx_n_s_Not); @@ -19013,12 +19013,12 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ __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, 663, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":662 + /* "hunter/_predicates.pyx":657 * ) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -19038,7 +19038,7 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_3Not_8__hash__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":665 +/* "hunter/_predicates.pyx":660 * return hash(('Not', self.predicate)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -19075,7 +19075,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, 665, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 660, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -19086,13 +19086,13 @@ 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, 665, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 660, __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, 665, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), __pyx_ptype_6hunter_6_event_Event, 1, "event", 0))) __PYX_ERR(0, 660, __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 */ @@ -19113,24 +19113,24 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 665, 0, __PYX_ERR(0, 665, __pyx_L1_error)); + __Pyx_TraceCall("__call__", __pyx_f[0], 660, 0, __PYX_ERR(0, 660, __pyx_L1_error)); - /* "hunter/_predicates.pyx":666 + /* "hunter/_predicates.pyx":661 * * def __call__(self, Event event): * return fast_Not_call(self, event) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error)) + __Pyx_TraceLine(661,0,__PYX_ERR(0, 661, __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, 666, __pyx_L1_error) + __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, 661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":665 + /* "hunter/_predicates.pyx":660 * return hash(('Not', self.predicate)) * * def __call__(self, Event event): # <<<<<<<<<<<<<< @@ -19150,7 +19150,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":668 +/* "hunter/_predicates.pyx":663 * return fast_Not_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -19184,16 +19184,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 668, 0, __PYX_ERR(0, 668, __pyx_L1_error)); + __Pyx_TraceCall("__or__", __pyx_f[0], 663, 0, __PYX_ERR(0, 663, __pyx_L1_error)); - /* "hunter/_predicates.pyx":669 + /* "hunter/_predicates.pyx":664 * * def __or__(self, other): * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< * return Not(And(( self).predicate, ( other).predicate)) * else: */ - __Pyx_TraceLine(669,0,__PYX_ERR(0, 669, __pyx_L1_error)) + __Pyx_TraceLine(664,0,__PYX_ERR(0, 664, __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) { @@ -19207,16 +19207,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "hunter/_predicates.pyx":670 + /* "hunter/_predicates.pyx":665 * 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(670,0,__PYX_ERR(0, 670, __pyx_L1_error)) + __Pyx_TraceLine(665,0,__PYX_ERR(0, 665, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 670, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __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); @@ -19224,17 +19224,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ __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, 670, __pyx_L1_error) + __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, 665, __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, 670, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __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":669 + /* "hunter/_predicates.pyx":664 * * def __or__(self, other): * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< @@ -19243,17 +19243,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ */ } - /* "hunter/_predicates.pyx":672 + /* "hunter/_predicates.pyx":667 * return Not(And(( self).predicate, ( other).predicate)) * else: * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(672,0,__PYX_ERR(0, 672, __pyx_L1_error)) + __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 672, __pyx_L1_error) + __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(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -19261,7 +19261,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ __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, 672, __pyx_L1_error) + __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, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -19269,7 +19269,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ goto __pyx_L0; } - /* "hunter/_predicates.pyx":668 + /* "hunter/_predicates.pyx":663 * return fast_Not_call(self, event) * * def __or__(self, other): # <<<<<<<<<<<<<< @@ -19290,7 +19290,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_12__or__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":674 +/* "hunter/_predicates.pyx":669 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -19324,16 +19324,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 674, 0, __PYX_ERR(0, 674, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 669, 0, __PYX_ERR(0, 669, __pyx_L1_error)); - /* "hunter/_predicates.pyx":675 + /* "hunter/_predicates.pyx":670 * * def __and__(self, other): * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< * return Not(Or(( self).predicate, ( other).predicate)) * else: */ - __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error)) + __Pyx_TraceLine(670,0,__PYX_ERR(0, 670, __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) { @@ -19347,16 +19347,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "hunter/_predicates.pyx":676 + /* "hunter/_predicates.pyx":671 * 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(676,0,__PYX_ERR(0, 676, __pyx_L1_error)) + __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __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); @@ -19364,17 +19364,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v __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, 676, __pyx_L1_error) + __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, 671, __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, 676, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6hunter_11_predicates_Not), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __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":675 + /* "hunter/_predicates.pyx":670 * * def __and__(self, other): * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< @@ -19383,17 +19383,17 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v */ } - /* "hunter/_predicates.pyx":678 + /* "hunter/_predicates.pyx":673 * return Not(Or(( self).predicate, ( other).predicate)) * else: * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error)) + __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 678, __pyx_L1_error) + __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(__pyx_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -19401,7 +19401,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v __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, 678, __pyx_L1_error) + __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, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -19409,7 +19409,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v goto __pyx_L0; } - /* "hunter/_predicates.pyx":674 + /* "hunter/_predicates.pyx":669 * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< @@ -19430,7 +19430,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_14__and__(PyObject *__pyx_v return __pyx_r; } -/* "hunter/_predicates.pyx":680 +/* "hunter/_predicates.pyx":675 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -19459,22 +19459,22 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 680, 0, __PYX_ERR(0, 680, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 675, 0, __PYX_ERR(0, 675, __pyx_L1_error)); - /* "hunter/_predicates.pyx":681 + /* "hunter/_predicates.pyx":676 * * def __invert__(self): * return self.predicate # <<<<<<<<<<<<<< * * cdef inline fast_Not_call(Not self, Event event): */ - __Pyx_TraceLine(681,0,__PYX_ERR(0, 681, __pyx_L1_error)) + __Pyx_TraceLine(676,0,__PYX_ERR(0, 676, __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":680 + /* "hunter/_predicates.pyx":675 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< @@ -19848,7 +19848,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_20__setstate_cython__(struc return __pyx_r; } -/* "hunter/_predicates.pyx":683 +/* "hunter/_predicates.pyx":678 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< @@ -19867,31 +19867,31 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_Not_call", 0); - __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 683, 0, __PYX_ERR(0, 683, __pyx_L1_error)); + __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 678, 0, __PYX_ERR(0, 678, __pyx_L1_error)); - /* "hunter/_predicates.pyx":684 + /* "hunter/_predicates.pyx":679 * * cdef inline fast_Not_call(Not self, Event event): * return not fast_call(self.predicate, event) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __pyx_L1_error)) + __Pyx_TraceLine(679,0,__PYX_ERR(0, 679, __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, 684, __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, 679, __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, 684, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 679, __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, 684, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":683 + /* "hunter/_predicates.pyx":678 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< @@ -19912,7 +19912,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Not_call(struc return __pyx_r; } -/* "hunter/_predicates.pyx":687 +/* "hunter/_predicates.pyx":682 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< @@ -19933,36 +19933,36 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fast_call", 0); - __Pyx_TraceCall("fast_call", __pyx_f[0], 687, 0, __PYX_ERR(0, 687, __pyx_L1_error)); + __Pyx_TraceCall("fast_call", __pyx_f[0], 682, 0, __PYX_ERR(0, 682, __pyx_L1_error)); - /* "hunter/_predicates.pyx":688 + /* "hunter/_predicates.pyx":683 * * 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(688,0,__PYX_ERR(0, 688, __pyx_L1_error)) + __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __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":689 + /* "hunter/_predicates.pyx":684 * 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(689,0,__PYX_ERR(0, 689, __pyx_L1_error)) + __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __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, 689, __pyx_L1_error) + __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, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":688 + /* "hunter/_predicates.pyx":683 * * cdef inline fast_call(callable, Event event): * if type(callable) is Query: # <<<<<<<<<<<<<< @@ -19971,34 +19971,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":690 + /* "hunter/_predicates.pyx":685 * 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(690,0,__PYX_ERR(0, 690, __pyx_L1_error)) + __Pyx_TraceLine(685,0,__PYX_ERR(0, 685, __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":691 + /* "hunter/_predicates.pyx":686 * 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(691,0,__PYX_ERR(0, 691, __pyx_L1_error)) + __Pyx_TraceLine(686,0,__PYX_ERR(0, 686, __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, 691, __pyx_L1_error) + __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, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":690 + /* "hunter/_predicates.pyx":685 * if type(callable) is Query: * return fast_Query_call( callable, event) * elif type(callable) is Or: # <<<<<<<<<<<<<< @@ -20007,34 +20007,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":692 + /* "hunter/_predicates.pyx":687 * 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(692,0,__PYX_ERR(0, 692, __pyx_L1_error)) + __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __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":693 + /* "hunter/_predicates.pyx":688 * 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(693,0,__PYX_ERR(0, 693, __pyx_L1_error)) + __Pyx_TraceLine(688,0,__PYX_ERR(0, 688, __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, 693, __pyx_L1_error) + __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, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":692 + /* "hunter/_predicates.pyx":687 * elif type(callable) is Or: * return fast_Or_call( callable, event) * elif type(callable) is And: # <<<<<<<<<<<<<< @@ -20043,34 +20043,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":694 + /* "hunter/_predicates.pyx":689 * 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(694,0,__PYX_ERR(0, 694, __pyx_L1_error)) + __Pyx_TraceLine(689,0,__PYX_ERR(0, 689, __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":695 + /* "hunter/_predicates.pyx":690 * 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(695,0,__PYX_ERR(0, 695, __pyx_L1_error)) + __Pyx_TraceLine(690,0,__PYX_ERR(0, 690, __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, 695, __pyx_L1_error) + __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, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":694 + /* "hunter/_predicates.pyx":689 * elif type(callable) is And: * return fast_And_call( callable, event) * elif type(callable) is Not: # <<<<<<<<<<<<<< @@ -20079,34 +20079,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":696 + /* "hunter/_predicates.pyx":691 * 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(696,0,__PYX_ERR(0, 696, __pyx_L1_error)) + __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __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":697 + /* "hunter/_predicates.pyx":692 * 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(697,0,__PYX_ERR(0, 697, __pyx_L1_error)) + __Pyx_TraceLine(692,0,__PYX_ERR(0, 692, __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, 697, __pyx_L1_error) + __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, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":696 + /* "hunter/_predicates.pyx":691 * elif type(callable) is Not: * return fast_Not_call( callable, event) * elif type(callable) is When: # <<<<<<<<<<<<<< @@ -20115,34 +20115,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":698 + /* "hunter/_predicates.pyx":693 * 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(698,0,__PYX_ERR(0, 698, __pyx_L1_error)) + __Pyx_TraceLine(693,0,__PYX_ERR(0, 693, __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":699 + /* "hunter/_predicates.pyx":694 * 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(699,0,__PYX_ERR(0, 699, __pyx_L1_error)) + __Pyx_TraceLine(694,0,__PYX_ERR(0, 694, __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, 699, __pyx_L1_error) + __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, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":698 + /* "hunter/_predicates.pyx":693 * elif type(callable) is When: * return fast_When_call( callable, event) * elif type(callable) is From: # <<<<<<<<<<<<<< @@ -20151,34 +20151,34 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":700 + /* "hunter/_predicates.pyx":695 * 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(700,0,__PYX_ERR(0, 700, __pyx_L1_error)) + __Pyx_TraceLine(695,0,__PYX_ERR(0, 695, __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":701 + /* "hunter/_predicates.pyx":696 * return fast_From_call( callable, event) * elif type(callable) is Backlog: * return fast_Backlog_call( callable, event) # <<<<<<<<<<<<<< * else: * return callable(event) */ - __Pyx_TraceLine(701,0,__PYX_ERR(0, 701, __pyx_L1_error)) + __Pyx_TraceLine(696,0,__PYX_ERR(0, 696, __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, 701, __pyx_L1_error) + __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, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":700 + /* "hunter/_predicates.pyx":695 * elif type(callable) is From: * return fast_From_call( callable, event) * elif type(callable) is Backlog: # <<<<<<<<<<<<<< @@ -20187,12 +20187,12 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject */ } - /* "hunter/_predicates.pyx":703 + /* "hunter/_predicates.pyx":698 * return fast_Backlog_call( callable, event) * else: * return callable(event) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(703,0,__PYX_ERR(0, 703, __pyx_L1_error)) + __Pyx_TraceLine(698,0,__PYX_ERR(0, 698, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_callable); @@ -20208,7 +20208,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject } __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, 703, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; @@ -20216,7 +20216,7 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_call(PyObject goto __pyx_L0; } - /* "hunter/_predicates.pyx":687 + /* "hunter/_predicates.pyx":682 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< @@ -26915,35 +26915,35 @@ static int __Pyx_modinit_type_init_code(void) { 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, 539, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 534, __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, 539, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 539, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_And, (PyObject *)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 534, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 534, __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, 591, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 586, __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, 591, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 591, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Or, (PyObject *)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 586, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 586, __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, 643, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 638, __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, 643, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 643, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Not, (PyObject *)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 638, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 638, __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, 264, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -27047,7 +27047,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, 546, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__) < 0) __PYX_ERR(0, 541, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__.tp_print = 0; #endif @@ -27055,7 +27055,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, 547, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(0, 542, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr.tp_print = 0; #endif @@ -27063,7 +27063,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, 599, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__) < 0) __PYX_ERR(0, 594, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__.tp_print = 0; #endif @@ -27071,7 +27071,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, 600, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 595, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr.tp_print = 0; #endif @@ -27539,44 +27539,44 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error)) - /* "hunter/_predicates.pyx":582 + /* "hunter/_predicates.pyx":577 * 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(582,0,__PYX_ERR(0, 582, __pyx_L1_error)) + __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __pyx_L1_error)) - /* "hunter/_predicates.pyx":635 + /* "hunter/_predicates.pyx":630 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: * if fast_call(predicate, event): */ - __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error)) + __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) - /* "hunter/_predicates.pyx":683 + /* "hunter/_predicates.pyx":678 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< * return not fast_call(self.predicate, event) * */ - __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __pyx_L1_error)) + __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error)) - /* "hunter/_predicates.pyx":687 + /* "hunter/_predicates.pyx":682 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< * if type(callable) is Query: * return fast_Query_call( callable, event) */ - __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error)) + __Pyx_TraceLine(682,0,__PYX_ERR(0, 682, __pyx_L1_error)) /* "(tree fragment)":1 diff --git a/src/hunter/_tracer.c b/src/hunter/_tracer.c index 5c27567..647181b 100644 --- a/src/hunter/_tracer.c +++ b/src/hunter/_tracer.c @@ -810,9 +810,9 @@ static const char *__pyx_f[] = { "src/hunter/_tracer.pyx", "stringsource", "src/hunter/_tracer.pxd", - ".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", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/type.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/bool.pxd", + ".tox/cythonize/lib64/python3.8/site-packages/Cython/Includes/cpython/complex.pxd", "src/hunter/_event.pxd", "src/hunter/_predicates.pxd", }; @@ -829,9 +829,9 @@ struct __pyx_obj_6hunter_11_predicates_Backlog; struct __pyx_obj_6hunter_7_tracer_Tracer; struct __pyx_opt_args_6hunter_6_event_5Event_detach; -/* "_event.pxd":38 - * Event clone(self) +/* "_event.pxd":37 * + * cpdef Event clone(self) * cpdef Event detach(self, value_filter=?) # <<<<<<<<<<<<<< */ struct __pyx_opt_args_6hunter_6_event_5Event_detach { @@ -1015,7 +1015,7 @@ struct __pyx_obj_6hunter_7_tracer_Tracer { */ struct __pyx_vtabstruct_6hunter_6_event_Event { - struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *); + struct __pyx_obj_6hunter_6_event_Event *(*clone)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch); struct __pyx_obj_6hunter_6_event_Event *(*detach)(struct __pyx_obj_6hunter_6_event_Event *, int __pyx_skip_dispatch, struct __pyx_opt_args_6hunter_6_event_5Event_detach *__pyx_optional_args); }; static struct __pyx_vtabstruct_6hunter_6_event_Event *__pyx_vtabptr_6hunter_6_event_Event; From 067115e8ba738d7510239fc8fac8fd234063fe76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 12:14:35 +0300 Subject: [PATCH 32/38] A bit of cleanup before debugging. --- src/hunter/_event.c | 1248 +++++++++++++++++++------------------ src/hunter/_event.pxd | 2 +- src/hunter/_event.pyx | 1 + tests/test_integration.py | 4 +- 4 files changed, 661 insertions(+), 594 deletions(-) diff --git a/src/hunter/_event.c b/src/hunter/_event.c index 172d66c..40fd0e6 100644 --- a/src/hunter/_event.c +++ b/src/hunter/_event.c @@ -886,7 +886,7 @@ struct __pyx_obj_6hunter_6_event_Event { }; -/* "hunter/_event.pyx":306 +/* "hunter/_event.pyx":307 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -2099,6 +2099,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_3arg___get__(struct __pyx_obj_6 static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ 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_8__reduce_cython__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_6_event_5Event_10__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 */ @@ -3481,7 +3482,7 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl * event.depth = self.depth * event.calls = self.calls # <<<<<<<<<<<<<< * event.threading_support = self.threading_support - * event._code = self._code + * event.detached = False */ __Pyx_TraceLine(115,0,__PYX_ERR(0, 115, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->calls; @@ -3491,8 +3492,8 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl * event.depth = self.depth * event.calls = self.calls * event.threading_support = self.threading_support # <<<<<<<<<<<<<< + * event.detached = False * event._code = self._code - * event._filename = self._filename */ __Pyx_TraceLine(116,0,__PYX_ERR(0, 116, __pyx_L1_error)) __pyx_t_4 = __pyx_v_self->threading_support; @@ -3501,11 +3502,21 @@ static struct __pyx_obj_6hunter_6_event_Event *__pyx_f_6hunter_6_event_5Event_cl /* "hunter/_event.pyx":117 * event.calls = self.calls * event.threading_support = self.threading_support + * event.detached = False # <<<<<<<<<<<<<< + * event._code = self._code + * event._filename = self._filename + */ + __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error)) + __pyx_v_event->detached = 0; + + /* "hunter/_event.pyx":118 + * event.threading_support = self.threading_support + * event.detached = False * event._code = self._code # <<<<<<<<<<<<<< * event._filename = self._filename * event._fullsource = self._fullsource */ - __Pyx_TraceLine(117,0,__PYX_ERR(0, 117, __pyx_L1_error)) + __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_code; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3514,14 +3525,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":118 - * event.threading_support = self.threading_support + /* "hunter/_event.pyx":119 + * event.detached = False * event._code = self._code * event._filename = self._filename # <<<<<<<<<<<<<< * event._fullsource = self._fullsource * event._function_object = self._function_object */ - __Pyx_TraceLine(118,0,__PYX_ERR(0, 118, __pyx_L1_error)) + __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_filename; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3530,14 +3541,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":119 + /* "hunter/_event.pyx":120 * event._code = self._code * event._filename = self._filename * event._fullsource = self._fullsource # <<<<<<<<<<<<<< * event._function_object = self._function_object * event._function = self._function */ - __Pyx_TraceLine(119,0,__PYX_ERR(0, 119, __pyx_L1_error)) + __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_fullsource; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3546,14 +3557,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":120 + /* "hunter/_event.pyx":121 * event._filename = self._filename * event._fullsource = self._fullsource * event._function_object = self._function_object # <<<<<<<<<<<<<< * event._function = self._function * event._globals = self._globals */ - __Pyx_TraceLine(120,0,__PYX_ERR(0, 120, __pyx_L1_error)) + __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_function_object; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3562,14 +3573,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":121 + /* "hunter/_event.pyx":122 * event._fullsource = self._fullsource * event._function_object = self._function_object * event._function = self._function # <<<<<<<<<<<<<< * event._globals = self._globals * event._lineno = self._lineno */ - __Pyx_TraceLine(121,0,__PYX_ERR(0, 121, __pyx_L1_error)) + __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_function; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3578,14 +3589,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":122 + /* "hunter/_event.pyx":123 * event._function_object = self._function_object * event._function = self._function * event._globals = self._globals # <<<<<<<<<<<<<< * event._lineno = self._lineno * event._locals = self._locals */ - __Pyx_TraceLine(122,0,__PYX_ERR(0, 122, __pyx_L1_error)) + __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_globals; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3594,14 +3605,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":123 + /* "hunter/_event.pyx":124 * event._function = self._function * event._globals = self._globals * event._lineno = self._lineno # <<<<<<<<<<<<<< * event._locals = self._locals * event._module = self._module */ - __Pyx_TraceLine(123,0,__PYX_ERR(0, 123, __pyx_L1_error)) + __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_lineno; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3610,14 +3621,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":124 + /* "hunter/_event.pyx":125 * event._globals = self._globals * event._lineno = self._lineno * event._locals = self._locals # <<<<<<<<<<<<<< * event._module = self._module * event._source = self._source */ - __Pyx_TraceLine(124,0,__PYX_ERR(0, 124, __pyx_L1_error)) + __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_locals; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3626,14 +3637,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":125 + /* "hunter/_event.pyx":126 * event._lineno = self._lineno * event._locals = self._locals * event._module = self._module # <<<<<<<<<<<<<< * event._source = self._source * event._stdlib = self._stdlib */ - __Pyx_TraceLine(125,0,__PYX_ERR(0, 125, __pyx_L1_error)) + __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_module; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3642,14 +3653,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":126 + /* "hunter/_event.pyx":127 * event._locals = self._locals * event._module = self._module * event._source = self._source # <<<<<<<<<<<<<< * event._stdlib = self._stdlib * event._threadidn = self._threadidn */ - __Pyx_TraceLine(126,0,__PYX_ERR(0, 126, __pyx_L1_error)) + __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_source; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3658,14 +3669,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":127 + /* "hunter/_event.pyx":128 * event._module = self._module * event._source = self._source * event._stdlib = self._stdlib # <<<<<<<<<<<<<< * event._threadidn = self._threadidn * event._threadname = self._threadname */ - __Pyx_TraceLine(127,0,__PYX_ERR(0, 127, __pyx_L1_error)) + __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_stdlib; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3674,14 +3685,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":128 + /* "hunter/_event.pyx":129 * event._source = self._source * event._stdlib = self._stdlib * event._threadidn = self._threadidn # <<<<<<<<<<<<<< * event._threadname = self._threadname * event._thread = self._thread */ - __Pyx_TraceLine(128,0,__PYX_ERR(0, 128, __pyx_L1_error)) + __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_threadidn; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3690,14 +3701,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":129 + /* "hunter/_event.pyx":130 * event._stdlib = self._stdlib * event._threadidn = self._threadidn * event._threadname = self._threadname # <<<<<<<<<<<<<< * event._thread = self._thread * return event */ - __Pyx_TraceLine(129,0,__PYX_ERR(0, 129, __pyx_L1_error)) + __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_threadname; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3706,14 +3717,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":130 + /* "hunter/_event.pyx":131 * event._threadidn = self._threadidn * event._threadname = self._threadname * event._thread = self._thread # <<<<<<<<<<<<<< * return event * */ - __Pyx_TraceLine(130,0,__PYX_ERR(0, 130, __pyx_L1_error)) + __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) __pyx_t_2 = __pyx_v_self->_thread; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -3722,14 +3733,14 @@ 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":131 + /* "hunter/_event.pyx":132 * event._threadname = self._threadname * event._thread = self._thread * return event # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(131,0,__PYX_ERR(0, 131, __pyx_L1_error)) + __Pyx_TraceLine(132,0,__PYX_ERR(0, 132, __pyx_L1_error)) __Pyx_XDECREF(((PyObject *)__pyx_r)); __Pyx_INCREF(((PyObject *)__pyx_v_event)); __pyx_r = __pyx_v_event; @@ -3799,7 +3810,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4clone(struct __pyx_obj_6hunter return __pyx_r; } -/* "hunter/_event.pyx":134 +/* "hunter/_event.pyx":135 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -3836,39 +3847,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 134, 0, __PYX_ERR(0, 134, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 135, 0, __PYX_ERR(0, 135, __pyx_L1_error)); - /* "hunter/_event.pyx":137 + /* "hunter/_event.pyx":138 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< * current = PyThread_get_thread_ident() * main = get_main_thread() */ - __Pyx_TraceLine(137,0,__PYX_ERR(0, 137, __pyx_L1_error)) + __Pyx_TraceLine(138,0,__PYX_ERR(0, 138, __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":138 + /* "hunter/_event.pyx":139 * * 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(138,0,__PYX_ERR(0, 138, __pyx_L1_error)) + __Pyx_TraceLine(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) __pyx_v_current = PyThread_get_thread_ident(); - /* "hunter/_event.pyx":139 + /* "hunter/_event.pyx":140 * 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(139,0,__PYX_ERR(0, 139, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 139, __pyx_L1_error) + __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_main_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -3882,20 +3893,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, 139, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __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":140 + /* "hunter/_event.pyx":141 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< * self._threadidn = None * else: */ - __Pyx_TraceLine(140,0,__PYX_ERR(0, 140, __pyx_L1_error)) + __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) __pyx_t_1 = (__pyx_v_main != Py_None); __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { @@ -3903,34 +3914,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, 140, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __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, 140, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main, __pyx_n_s_ident); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __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, 140, __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, 141, __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, 140, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 141, __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":141 + /* "hunter/_event.pyx":142 * main = get_main_thread() * if main is not None and current == main.ident: * self._threadidn = None # <<<<<<<<<<<<<< * else: * self._threadidn = current */ - __Pyx_TraceLine(141,0,__PYX_ERR(0, 141, __pyx_L1_error)) + __Pyx_TraceLine(142,0,__PYX_ERR(0, 142, __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":140 + /* "hunter/_event.pyx":141 * current = PyThread_get_thread_ident() * main = get_main_thread() * if main is not None and current == main.ident: # <<<<<<<<<<<<<< @@ -3940,16 +3951,16 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ goto __pyx_L4; } - /* "hunter/_event.pyx":143 + /* "hunter/_event.pyx":144 * self._threadidn = None * else: * self._threadidn = current # <<<<<<<<<<<<<< * return self._threadidn * */ - __Pyx_TraceLine(143,0,__PYX_ERR(0, 143, __pyx_L1_error)) + __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) /*else*/ { - __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_current); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __Pyx_GOTREF(__pyx_v_self->_threadidn); @@ -3959,7 +3970,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ } __pyx_L4:; - /* "hunter/_event.pyx":137 + /* "hunter/_event.pyx":138 * cdef long current * * if self._threadidn is UNSET: # <<<<<<<<<<<<<< @@ -3968,20 +3979,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":144 + /* "hunter/_event.pyx":145 * else: * self._threadidn = current * return self._threadidn # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(144,0,__PYX_ERR(0, 144, __pyx_L1_error)) + __Pyx_TraceLine(145,0,__PYX_ERR(0, 145, __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":134 + /* "hunter/_event.pyx":135 * * @property * def threadid(self): # <<<<<<<<<<<<<< @@ -4004,7 +4015,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8threadid___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":147 +/* "hunter/_event.pyx":148 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -4038,41 +4049,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 147, 0, __PYX_ERR(0, 147, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 148, 0, __PYX_ERR(0, 148, __pyx_L1_error)); - /* "hunter/_event.pyx":148 + /* "hunter/_event.pyx":149 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< * if self._thread is UNSET: * self._thread = current_thread() */ - __Pyx_TraceLine(148,0,__PYX_ERR(0, 148, __pyx_L1_error)) + __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __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":149 + /* "hunter/_event.pyx":150 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< * self._thread = current_thread() * self._threadname = self._thread.name */ - __Pyx_TraceLine(149,0,__PYX_ERR(0, 149, __pyx_L1_error)) + __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __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":150 + /* "hunter/_event.pyx":151 * if self._threadname is UNSET: * if self._thread is UNSET: * self._thread = current_thread() # <<<<<<<<<<<<<< * self._threadname = self._thread.name * return self._threadname */ - __Pyx_TraceLine(150,0,__PYX_ERR(0, 150, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_current_thread); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -4086,7 +4097,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, 150, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -4095,7 +4106,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":149 + /* "hunter/_event.pyx":150 * def threadname(self): * if self._threadname is UNSET: * if self._thread is UNSET: # <<<<<<<<<<<<<< @@ -4104,15 +4115,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":151 + /* "hunter/_event.pyx":152 * if self._thread is UNSET: * self._thread = current_thread() * self._threadname = self._thread.name # <<<<<<<<<<<<<< * return self._threadname * */ - __Pyx_TraceLine(151,0,__PYX_ERR(0, 151, __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, 151, __pyx_L1_error) + __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __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, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_threadname); @@ -4120,7 +4131,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":148 + /* "hunter/_event.pyx":149 * @property * def threadname(self): * if self._threadname is UNSET: # <<<<<<<<<<<<<< @@ -4129,20 +4140,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p */ } - /* "hunter/_event.pyx":152 + /* "hunter/_event.pyx":153 * self._thread = current_thread() * self._threadname = self._thread.name * return self._threadname # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(152,0,__PYX_ERR(0, 152, __pyx_L1_error)) + __Pyx_TraceLine(153,0,__PYX_ERR(0, 153, __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":147 + /* "hunter/_event.pyx":148 * * @property * def threadname(self): # <<<<<<<<<<<<<< @@ -4164,7 +4175,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10threadname___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":155 +/* "hunter/_event.pyx":156 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -4196,41 +4207,41 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 155, 0, __PYX_ERR(0, 155, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 156, 0, __PYX_ERR(0, 156, __pyx_L1_error)); - /* "hunter/_event.pyx":156 + /* "hunter/_event.pyx":157 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals */ - __Pyx_TraceLine(156,0,__PYX_ERR(0, 156, __pyx_L1_error)) + __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __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":157 + /* "hunter/_event.pyx":158 * def locals(self): * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) # <<<<<<<<<<<<<< * self._locals = self.frame.f_locals * return self._locals */ - __Pyx_TraceLine(157,0,__PYX_ERR(0, 157, __pyx_L1_error)) + __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __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":158 + /* "hunter/_event.pyx":159 * if self._locals is UNSET: * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals # <<<<<<<<<<<<<< * return self._locals * */ - __Pyx_TraceLine(158,0,__PYX_ERR(0, 158, __pyx_L1_error)) + __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_locals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4239,7 +4250,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":156 + /* "hunter/_event.pyx":157 * @property * def locals(self): * if self._locals is UNSET: # <<<<<<<<<<<<<< @@ -4248,20 +4259,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":159 + /* "hunter/_event.pyx":160 * PyFrame_FastToLocals(self.frame) * self._locals = self.frame.f_locals * return self._locals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(159,0,__PYX_ERR(0, 159, __pyx_L1_error)) + __Pyx_TraceLine(160,0,__PYX_ERR(0, 160, __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":155 + /* "hunter/_event.pyx":156 * * @property * def locals(self): # <<<<<<<<<<<<<< @@ -4281,7 +4292,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6locals___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":162 +/* "hunter/_event.pyx":163 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -4313,28 +4324,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 162, 0, __PYX_ERR(0, 162, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 163, 0, __PYX_ERR(0, 163, __pyx_L1_error)); - /* "hunter/_event.pyx":163 + /* "hunter/_event.pyx":164 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< * self._globals = self.frame.f_globals * return self._globals */ - __Pyx_TraceLine(163,0,__PYX_ERR(0, 163, __pyx_L1_error)) + __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __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":164 + /* "hunter/_event.pyx":165 * def globals(self): * if self._globals is UNSET: * self._globals = self.frame.f_globals # <<<<<<<<<<<<<< * return self._globals * */ - __Pyx_TraceLine(164,0,__PYX_ERR(0, 164, __pyx_L1_error)) + __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) __pyx_t_3 = __pyx_v_self->frame->f_globals; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4343,7 +4354,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":163 + /* "hunter/_event.pyx":164 * @property * def globals(self): * if self._globals is UNSET: # <<<<<<<<<<<<<< @@ -4352,20 +4363,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o */ } - /* "hunter/_event.pyx":165 + /* "hunter/_event.pyx":166 * if self._globals is UNSET: * self._globals = self.frame.f_globals * return self._globals # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(165,0,__PYX_ERR(0, 165, __pyx_L1_error)) + __Pyx_TraceLine(166,0,__PYX_ERR(0, 166, __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":162 + /* "hunter/_event.pyx":163 * * @property * def globals(self): # <<<<<<<<<<<<<< @@ -4385,7 +4396,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_7globals___get__(struct __pyx_o return __pyx_r; } -/* "hunter/_event.pyx":168 +/* "hunter/_event.pyx":169 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4417,29 +4428,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 168, 0, __PYX_ERR(0, 168, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 169, 0, __PYX_ERR(0, 169, __pyx_L1_error)); - /* "hunter/_event.pyx":169 + /* "hunter/_event.pyx":170 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< * self._function = self.frame.f_code.co_name * return self._function */ - __Pyx_TraceLine(169,0,__PYX_ERR(0, 169, __pyx_L1_error)) + __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __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":170 + /* "hunter/_event.pyx":171 * def function(self): * if self._function is UNSET: * self._function = self.frame.f_code.co_name # <<<<<<<<<<<<<< * return self._function * */ - __Pyx_TraceLine(170,0,__PYX_ERR(0, 170, __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, 170, __pyx_L1_error) + __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __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, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_function); @@ -4447,7 +4458,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":169 + /* "hunter/_event.pyx":170 * @property * def function(self): * if self._function is UNSET: # <<<<<<<<<<<<<< @@ -4456,20 +4467,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":171 + /* "hunter/_event.pyx":172 * if self._function is UNSET: * self._function = self.frame.f_code.co_name * return self._function # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(171,0,__PYX_ERR(0, 171, __pyx_L1_error)) + __Pyx_TraceLine(172,0,__PYX_ERR(0, 172, __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":168 + /* "hunter/_event.pyx":169 * * @property * def function(self): # <<<<<<<<<<<<<< @@ -4489,7 +4500,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8function___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":174 +/* "hunter/_event.pyx":175 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -4535,61 +4546,61 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 174, 0, __PYX_ERR(0, 174, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 175, 0, __PYX_ERR(0, 175, __pyx_L1_error)); - /* "hunter/_event.pyx":175 + /* "hunter/_event.pyx":176 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< * code = self.code * if code.co_name is None: */ - __Pyx_TraceLine(175,0,__PYX_ERR(0, 175, __pyx_L1_error)) + __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __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":176 + /* "hunter/_event.pyx":177 * def function_object(self): * if self._function_object is UNSET: * code = self.code # <<<<<<<<<<<<<< * if code.co_name is None: * return None */ - __Pyx_TraceLine(176,0,__PYX_ERR(0, 176, __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, 176, __pyx_L1_error) + __Pyx_TraceLine(177,0,__PYX_ERR(0, 177, __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, 177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_code = __pyx_t_3; __pyx_t_3 = 0; - /* "hunter/_event.pyx":177 + /* "hunter/_event.pyx":178 * 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(177,0,__PYX_ERR(0, 177, __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, 177, __pyx_L1_error) + __Pyx_TraceLine(178,0,__PYX_ERR(0, 178, __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, 178, __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":178 + /* "hunter/_event.pyx":179 * 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(178,0,__PYX_ERR(0, 178, __pyx_L1_error)) + __Pyx_TraceLine(179,0,__PYX_ERR(0, 179, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "hunter/_event.pyx":177 + /* "hunter/_event.pyx":178 * if self._function_object is UNSET: * code = self.code * if code.co_name is None: # <<<<<<<<<<<<<< @@ -4598,20 +4609,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":180 + /* "hunter/_event.pyx":181 * 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(180,0,__PYX_ERR(0, 180, __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, 180, __pyx_L1_error) + __Pyx_TraceLine(181,0,__PYX_ERR(0, 181, __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, 181, __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, 180, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __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, 180, __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, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -4628,7 +4639,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, 180, __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, 181, __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; @@ -4637,14 +4648,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, 180, __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, 181, __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, 180, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __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; @@ -4655,7 +4666,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, 180, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -4663,15 +4674,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":181 + /* "hunter/_event.pyx":182 * # 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(181,0,__PYX_ERR(0, 181, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L1_error) + __Pyx_TraceLine(182,0,__PYX_ERR(0, 182, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_if_same_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4688,7 +4699,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, 181, __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, 182, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4696,13 +4707,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, 181, __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, 182, __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, 181, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 182, __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; @@ -4713,7 +4724,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, 181, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -4721,14 +4732,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":186 + /* "hunter/_event.pyx":187 * # 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(186,0,__PYX_ERR(0, 186, __pyx_L1_error)) + __Pyx_TraceLine(187,0,__PYX_ERR(0, 187, __pyx_L1_error)) __pyx_t_2 = (__pyx_v_func == Py_None); __pyx_t_9 = (__pyx_t_2 != 0); if (__pyx_t_9) { @@ -4736,32 +4747,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, 186, __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, 187, __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, 186, __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, 187, __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, 186, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 187, __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":187 + /* "hunter/_event.pyx":188 * # 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(187,0,__PYX_ERR(0, 187, __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, 187, __pyx_L1_error) + __Pyx_TraceLine(188,0,__PYX_ERR(0, 188, __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, 188, __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, 187, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __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, 187, __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, 188, __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, 187, __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, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -4777,21 +4788,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, 187, __pyx_L1_error) + 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_v_first_arg = __pyx_t_5; __pyx_t_5 = 0; - /* "hunter/_event.pyx":188 + /* "hunter/_event.pyx":189 * 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(188,0,__PYX_ERR(0, 188, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 188, __pyx_L1_error) + __Pyx_TraceLine(189,0,__PYX_ERR(0, 189, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -4808,7 +4819,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, 188, __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, 189, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -4816,13 +4827,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, 188, __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, 189, __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, 188, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __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; @@ -4833,7 +4844,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, 188, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -4841,7 +4852,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":186 + /* "hunter/_event.pyx":187 * # 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: # <<<<<<<<<<<<<< @@ -4850,34 +4861,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":191 + /* "hunter/_event.pyx":192 * # 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(191,0,__PYX_ERR(0, 191, __pyx_L1_error)) + __Pyx_TraceLine(192,0,__PYX_ERR(0, 192, __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":192 + /* "hunter/_event.pyx":193 * # 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(192,0,__PYX_ERR(0, 192, __pyx_L1_error)) + __Pyx_TraceLine(193,0,__PYX_ERR(0, 193, __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, 192, __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, 193, __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, 192, __pyx_L1_error) + __PYX_ERR(0, 193, __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, 192, __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, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); @@ -4886,34 +4897,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, 192, __pyx_L1_error) + if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":193 + /* "hunter/_event.pyx":194 * 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(193,0,__PYX_ERR(0, 193, __pyx_L1_error)) + __Pyx_TraceLine(194,0,__PYX_ERR(0, 194, __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":194 + /* "hunter/_event.pyx":195 * 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(194,0,__PYX_ERR(0, 194, __pyx_L1_error)) + __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) goto __pyx_L9_continue; - /* "hunter/_event.pyx":193 + /* "hunter/_event.pyx":194 * if func is None: * for v in self.globals.values(): * if not isinstance(v, type): # <<<<<<<<<<<<<< @@ -4922,15 +4933,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":195 + /* "hunter/_event.pyx":196 * if not isinstance(v, type): * continue * func = get_func_in_mro(v, code) # <<<<<<<<<<<<<< * if func is not None: * break */ - __Pyx_TraceLine(195,0,__PYX_ERR(0, 195, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_get_func_in_mro); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __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_12 = 0; @@ -4947,7 +4958,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, 195, __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, 196, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -4955,13 +4966,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, 195, __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, 196, __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, 195, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 196, __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; @@ -4972,7 +4983,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, 195, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -4980,29 +4991,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":196 + /* "hunter/_event.pyx":197 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< * break * self._function_object = func */ - __Pyx_TraceLine(196,0,__PYX_ERR(0, 196, __pyx_L1_error)) + __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __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":197 + /* "hunter/_event.pyx":198 * func = get_func_in_mro(v, code) * if func is not None: * break # <<<<<<<<<<<<<< * self._function_object = func * return self._function_object */ - __Pyx_TraceLine(197,0,__PYX_ERR(0, 197, __pyx_L1_error)) + __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __pyx_L1_error)) goto __pyx_L10_break; - /* "hunter/_event.pyx":196 + /* "hunter/_event.pyx":197 * continue * func = get_func_in_mro(v, code) * if func is not None: # <<<<<<<<<<<<<< @@ -5015,7 +5026,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":191 + /* "hunter/_event.pyx":192 * # 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: # <<<<<<<<<<<<<< @@ -5024,21 +5035,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":198 + /* "hunter/_event.pyx":199 * if func is not None: * break * self._function_object = func # <<<<<<<<<<<<<< * return self._function_object * */ - __Pyx_TraceLine(198,0,__PYX_ERR(0, 198, __pyx_L1_error)) + __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __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":175 + /* "hunter/_event.pyx":176 * @property * def function_object(self): * if self._function_object is UNSET: # <<<<<<<<<<<<<< @@ -5047,20 +5058,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc */ } - /* "hunter/_event.pyx":199 + /* "hunter/_event.pyx":200 * break * self._function_object = func * return self._function_object # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(199,0,__PYX_ERR(0, 199, __pyx_L1_error)) + __Pyx_TraceLine(200,0,__PYX_ERR(0, 200, __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":174 + /* "hunter/_event.pyx":175 * * @property * def function_object(self): # <<<<<<<<<<<<<< @@ -5089,7 +5100,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_15function_object___get__(struc return __pyx_r; } -/* "hunter/_event.pyx":202 +/* "hunter/_event.pyx":203 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -5123,60 +5134,60 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 202, 0, __PYX_ERR(0, 202, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 203, 0, __PYX_ERR(0, 203, __pyx_L1_error)); - /* "hunter/_event.pyx":203 + /* "hunter/_event.pyx":204 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< * module = self.frame.f_globals.get('__name__', '') * if module is None: */ - __Pyx_TraceLine(203,0,__PYX_ERR(0, 203, __pyx_L1_error)) + __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __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":204 + /* "hunter/_event.pyx":205 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __Pyx_TraceLine(204,0,__PYX_ERR(0, 204, __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, 204, __pyx_L1_error) + __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __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, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 205, __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":205 + /* "hunter/_event.pyx":206 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< * module = '' * */ - __Pyx_TraceLine(205,0,__PYX_ERR(0, 205, __pyx_L1_error)) + __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __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":206 + /* "hunter/_event.pyx":207 * module = self.frame.f_globals.get('__name__', '') * if module is None: * module = '' # <<<<<<<<<<<<<< * * self._module = module */ - __Pyx_TraceLine(206,0,__PYX_ERR(0, 206, __pyx_L1_error)) + __Pyx_TraceLine(207,0,__PYX_ERR(0, 207, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s__5); __Pyx_DECREF_SET(__pyx_v_module, __pyx_kp_s__5); - /* "hunter/_event.pyx":205 + /* "hunter/_event.pyx":206 * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') * if module is None: # <<<<<<<<<<<<<< @@ -5185,21 +5196,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":208 + /* "hunter/_event.pyx":209 * module = '' * * self._module = module # <<<<<<<<<<<<<< * return self._module * */ - __Pyx_TraceLine(208,0,__PYX_ERR(0, 208, __pyx_L1_error)) + __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __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":203 + /* "hunter/_event.pyx":204 * @property * def module(self): * if self._module is UNSET: # <<<<<<<<<<<<<< @@ -5208,20 +5219,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":209 + /* "hunter/_event.pyx":210 * * self._module = module * return self._module # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(209,0,__PYX_ERR(0, 209, __pyx_L1_error)) + __Pyx_TraceLine(210,0,__PYX_ERR(0, 210, __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":202 + /* "hunter/_event.pyx":203 * * @property * def module(self): # <<<<<<<<<<<<<< @@ -5243,7 +5254,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6module___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":212 +/* "hunter/_event.pyx":213 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5284,54 +5295,54 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 212, 0, __PYX_ERR(0, 212, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 213, 0, __PYX_ERR(0, 213, __pyx_L1_error)); - /* "hunter/_event.pyx":213 + /* "hunter/_event.pyx":214 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< * filename = self.frame.f_code.co_filename * if not filename: */ - __Pyx_TraceLine(213,0,__PYX_ERR(0, 213, __pyx_L1_error)) + __Pyx_TraceLine(214,0,__PYX_ERR(0, 214, __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":214 + /* "hunter/_event.pyx":215 * 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(214,0,__PYX_ERR(0, 214, __pyx_L1_error)) + __Pyx_TraceLine(215,0,__PYX_ERR(0, 215, __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":215 + /* "hunter/_event.pyx":216 * 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(215,0,__PYX_ERR(0, 215, __pyx_L1_error)) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 215, __pyx_L1_error) + __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 216, __pyx_L1_error) __pyx_t_1 = ((!__pyx_t_2) != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":216 + /* "hunter/_event.pyx":217 * filename = self.frame.f_code.co_filename * if not filename: * filename = self.frame.f_globals.get('__file__') # <<<<<<<<<<<<<< * if not filename: * filename = '' */ - __Pyx_TraceLine(216,0,__PYX_ERR(0, 216, __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, 216, __pyx_L1_error) + __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __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, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5345,13 +5356,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, 216, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 217, __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":215 + /* "hunter/_event.pyx":216 * if self._filename is UNSET: * filename = self.frame.f_code.co_filename * if not filename: # <<<<<<<<<<<<<< @@ -5360,30 +5371,30 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":217 + /* "hunter/_event.pyx":218 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< * filename = '' * elif filename.endswith(('.pyc', '.pyo')): */ - __Pyx_TraceLine(217,0,__PYX_ERR(0, 217, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filename); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 218, __pyx_L1_error) __pyx_t_2 = ((!__pyx_t_1) != 0); if (__pyx_t_2) { - /* "hunter/_event.pyx":218 + /* "hunter/_event.pyx":219 * filename = self.frame.f_globals.get('__file__') * if not filename: * filename = '' # <<<<<<<<<<<<<< * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] */ - __Pyx_TraceLine(218,0,__PYX_ERR(0, 218, __pyx_L1_error)) + __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) __Pyx_INCREF(__pyx_kp_s__5); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_kp_s__5); - /* "hunter/_event.pyx":217 + /* "hunter/_event.pyx":218 * if not filename: * filename = self.frame.f_globals.get('__file__') * if not filename: # <<<<<<<<<<<<<< @@ -5393,15 +5404,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":219 + /* "hunter/_event.pyx":220 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error) + __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5415,27 +5426,27 @@ 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_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, 219, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __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, 219, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":220 + /* "hunter/_event.pyx":221 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __Pyx_TraceLine(220,0,__PYX_ERR(0, 220, __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, 220, __pyx_L1_error) + __Pyx_TraceLine(221,0,__PYX_ERR(0, 221, __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, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":219 + /* "hunter/_event.pyx":220 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< @@ -5445,15 +5456,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ goto __pyx_L5; } - /* "hunter/_event.pyx":221 + /* "hunter/_event.pyx":222 * 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(221,0,__PYX_ERR(0, 221, __pyx_L1_error)) - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_filename, __pyx_n_s_endswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -5467,24 +5478,24 @@ 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_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, 221, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __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, 221, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":222 + /* "hunter/_event.pyx":223 * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) # <<<<<<<<<<<<<< * for ext in ('.pyx', '.py'): * cyfilename = basename + ext */ - __Pyx_TraceLine(222,0,__PYX_ERR(0, 222, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __pyx_L1_error) + __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CYTHON_SUFFIX_RE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 223, __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, 222, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sub); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5502,7 +5513,7 @@ 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__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, 222, __pyx_L1_error) + __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, 223, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -5510,13 +5521,13 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { 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, 222, __pyx_L1_error) + __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, 223, __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, 222, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __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; @@ -5527,7 +5538,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ __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, 222, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -5535,48 +5546,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":223 + /* "hunter/_event.pyx":224 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) + __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __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, 223, __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, 224, __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, 223, __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, 224, __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":224 + /* "hunter/_event.pyx":225 * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): * cyfilename = basename + ext # <<<<<<<<<<<<<< * if exists(cyfilename): * filename = cyfilename */ - __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) - __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __pyx_L1_error) + __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) + __pyx_t_5 = PyNumber_Add(__pyx_v_basename, __pyx_v_ext); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_cyfilename, __pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":226 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< * filename = cyfilename * break */ - __Pyx_TraceLine(225,0,__PYX_ERR(0, 225, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_exists); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { @@ -5590,35 +5601,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, 225, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 226, __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, 225, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":226 + /* "hunter/_event.pyx":227 * cyfilename = basename + ext * if exists(cyfilename): * filename = cyfilename # <<<<<<<<<<<<<< * break * */ - __Pyx_TraceLine(226,0,__PYX_ERR(0, 226, __pyx_L1_error)) + __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) __Pyx_INCREF(__pyx_v_cyfilename); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_v_cyfilename); - /* "hunter/_event.pyx":227 + /* "hunter/_event.pyx":228 * if exists(cyfilename): * filename = cyfilename * break # <<<<<<<<<<<<<< * * self._filename = filename */ - __Pyx_TraceLine(227,0,__PYX_ERR(0, 227, __pyx_L1_error)) + __Pyx_TraceLine(228,0,__PYX_ERR(0, 228, __pyx_L1_error)) goto __pyx_L7_break; - /* "hunter/_event.pyx":225 + /* "hunter/_event.pyx":226 * for ext in ('.pyx', '.py'): * cyfilename = basename + ext * if exists(cyfilename): # <<<<<<<<<<<<<< @@ -5627,19 +5638,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":223 + /* "hunter/_event.pyx":224 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __Pyx_TraceLine(223,0,__PYX_ERR(0, 223, __pyx_L1_error)) + __Pyx_TraceLine(224,0,__PYX_ERR(0, 224, __pyx_L1_error)) } __pyx_L7_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "hunter/_event.pyx":221 + /* "hunter/_event.pyx":222 * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -5649,21 +5660,21 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ } __pyx_L5:; - /* "hunter/_event.pyx":229 + /* "hunter/_event.pyx":230 * break * * self._filename = filename # <<<<<<<<<<<<<< * return self._filename * */ - __Pyx_TraceLine(229,0,__PYX_ERR(0, 229, __pyx_L1_error)) + __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __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":213 + /* "hunter/_event.pyx":214 * @property * def filename(self): * if self._filename is UNSET: # <<<<<<<<<<<<<< @@ -5672,20 +5683,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ */ } - /* "hunter/_event.pyx":230 + /* "hunter/_event.pyx":231 * * self._filename = filename * return self._filename # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(230,0,__PYX_ERR(0, 230, __pyx_L1_error)) + __Pyx_TraceLine(231,0,__PYX_ERR(0, 231, __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":212 + /* "hunter/_event.pyx":213 * * @property * def filename(self): # <<<<<<<<<<<<<< @@ -5712,7 +5723,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_8filename___get__(struct __pyx_ return __pyx_r; } -/* "hunter/_event.pyx":233 +/* "hunter/_event.pyx":234 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5744,29 +5755,29 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 233, 0, __PYX_ERR(0, 233, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 234, 0, __PYX_ERR(0, 234, __pyx_L1_error)); - /* "hunter/_event.pyx":234 + /* "hunter/_event.pyx":235 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< * self._lineno = self.frame.f_lineno * return self._lineno */ - __Pyx_TraceLine(234,0,__PYX_ERR(0, 234, __pyx_L1_error)) + __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __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":235 + /* "hunter/_event.pyx":236 * def lineno(self): * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno # <<<<<<<<<<<<<< * return self._lineno * */ - __Pyx_TraceLine(235,0,__PYX_ERR(0, 235, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->frame->f_lineno); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_lineno); @@ -5774,7 +5785,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":234 + /* "hunter/_event.pyx":235 * @property * def lineno(self): * if self._lineno is UNSET: # <<<<<<<<<<<<<< @@ -5783,20 +5794,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":236 + /* "hunter/_event.pyx":237 * if self._lineno is UNSET: * self._lineno = self.frame.f_lineno * return self._lineno # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(236,0,__PYX_ERR(0, 236, __pyx_L1_error)) + __Pyx_TraceLine(237,0,__PYX_ERR(0, 237, __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":233 + /* "hunter/_event.pyx":234 * * @property * def lineno(self): # <<<<<<<<<<<<<< @@ -5816,7 +5827,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6lineno___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":239 +/* "hunter/_event.pyx":240 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5847,34 +5858,34 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 240, 0, __PYX_ERR(0, 240, __pyx_L1_error)); - /* "hunter/_event.pyx":240 + /* "hunter/_event.pyx":241 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< * return self.frame.f_code * else: */ - __Pyx_TraceLine(240,0,__PYX_ERR(0, 240, __pyx_L1_error)) + __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __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":241 + /* "hunter/_event.pyx":242 * def code(self): * if self._code is UNSET: * return self.frame.f_code # <<<<<<<<<<<<<< * else: * return self._code */ - __Pyx_TraceLine(241,0,__PYX_ERR(0, 241, __pyx_L1_error)) + __Pyx_TraceLine(242,0,__PYX_ERR(0, 242, __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":240 + /* "hunter/_event.pyx":241 * @property * def code(self): * if self._code is UNSET: # <<<<<<<<<<<<<< @@ -5883,14 +5894,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ */ } - /* "hunter/_event.pyx":243 + /* "hunter/_event.pyx":244 * return self.frame.f_code * else: * return self._code # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(243,0,__PYX_ERR(0, 243, __pyx_L1_error)) + __Pyx_TraceLine(244,0,__PYX_ERR(0, 244, __pyx_L1_error)) /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_code); @@ -5898,7 +5909,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ goto __pyx_L0; } - /* "hunter/_event.pyx":239 + /* "hunter/_event.pyx":240 * * @property * def code(self): # <<<<<<<<<<<<<< @@ -5917,7 +5928,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_4code___get__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_event.pyx":246 +/* "hunter/_event.pyx":247 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -5953,31 +5964,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 246, 0, __PYX_ERR(0, 246, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 247, 0, __PYX_ERR(0, 247, __pyx_L1_error)); - /* "hunter/_event.pyx":247 + /* "hunter/_event.pyx":248 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: */ - __Pyx_TraceLine(247,0,__PYX_ERR(0, 247, __pyx_L1_error)) + __Pyx_TraceLine(248,0,__PYX_ERR(0, 248, __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":248 + /* "hunter/_event.pyx":249 * 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(248,0,__PYX_ERR(0, 248, __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, 248, __pyx_L1_error) + __Pyx_TraceLine(249,0,__PYX_ERR(0, 249, __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, 249, __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, 248, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -5992,39 +6003,39 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __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, 248, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __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":249 + /* "hunter/_event.pyx":250 * 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(249,0,__PYX_ERR(0, 249, __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, 249, __pyx_L1_error) + __Pyx_TraceLine(250,0,__PYX_ERR(0, 250, __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, 250, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "hunter/_event.pyx":251 + /* "hunter/_event.pyx":252 * 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(251,0,__PYX_ERR(0, 251, __pyx_L1_error)) + __Pyx_TraceLine(252,0,__PYX_ERR(0, 252, __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":250 * if self._stdlib is UNSET: * module_parts = self.module.split('.') * if 'pkg_resources' in module_parts: # <<<<<<<<<<<<<< @@ -6034,26 +6045,26 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":252 + /* "hunter/_event.pyx":253 * # 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(252,0,__PYX_ERR(0, 252, __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, 252, __pyx_L1_error) + __Pyx_TraceLine(253,0,__PYX_ERR(0, 253, __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, 253, __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, 252, __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, 253, __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, 252, __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, 253, __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, 252, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -6068,39 +6079,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, 252, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __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, 252, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 253, __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, 252, __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, 253, __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, 252, __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, 253, __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":254 + /* "hunter/_event.pyx":255 * 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(254,0,__PYX_ERR(0, 254, __pyx_L1_error)) + __Pyx_TraceLine(255,0,__PYX_ERR(0, 255, __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":252 + /* "hunter/_event.pyx":253 * # skip this over-vendored module * self._stdlib = True * elif self.filename == '' and (self.module.startswith('namedtuple_') or self.module == 'site'): # <<<<<<<<<<<<<< @@ -6110,20 +6121,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":255 + /* "hunter/_event.pyx":256 * # 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(255,0,__PYX_ERR(0, 255, __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, 255, __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_filename); 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_startswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_startswith); 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_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SITE_PACKAGES_PATHS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -6138,28 +6149,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, 255, __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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 255, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":257 + /* "hunter/_event.pyx":258 * 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(257,0,__PYX_ERR(0, 257, __pyx_L1_error)) + __Pyx_TraceLine(258,0,__PYX_ERR(0, 258, __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":255 + /* "hunter/_event.pyx":256 * # skip namedtuple exec garbage * self._stdlib = True * elif self.filename.startswith(SITE_PACKAGES_PATHS): # <<<<<<<<<<<<<< @@ -6169,20 +6180,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":258 + /* "hunter/_event.pyx":259 * # 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(258,0,__PYX_ERR(0, 258, __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, 258, __pyx_L1_error) + __Pyx_TraceLine(259,0,__PYX_ERR(0, 259, __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, 259, __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, 258, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 259, __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, 258, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_SYS_PREFIX_PATHS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -6197,28 +6208,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, 258, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __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, 258, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "hunter/_event.pyx":259 + /* "hunter/_event.pyx":260 * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): * self._stdlib = True # <<<<<<<<<<<<<< * else: * self._stdlib = False */ - __Pyx_TraceLine(259,0,__PYX_ERR(0, 259, __pyx_L1_error)) + __Pyx_TraceLine(260,0,__PYX_ERR(0, 260, __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":258 + /* "hunter/_event.pyx":259 * # if it's in site-packages then its definitely not stdlib * self._stdlib = False * elif self.filename.startswith(SYS_PREFIX_PATHS): # <<<<<<<<<<<<<< @@ -6228,14 +6239,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob goto __pyx_L4; } - /* "hunter/_event.pyx":261 + /* "hunter/_event.pyx":262 * self._stdlib = True * else: * self._stdlib = False # <<<<<<<<<<<<<< * return self._stdlib * */ - __Pyx_TraceLine(261,0,__PYX_ERR(0, 261, __pyx_L1_error)) + __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L1_error)) /*else*/ { __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); @@ -6245,7 +6256,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob } __pyx_L4:; - /* "hunter/_event.pyx":247 + /* "hunter/_event.pyx":248 * @property * def stdlib(self): * if self._stdlib is UNSET: # <<<<<<<<<<<<<< @@ -6254,20 +6265,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":262 + /* "hunter/_event.pyx":263 * else: * self._stdlib = False * return self._stdlib # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(262,0,__PYX_ERR(0, 262, __pyx_L1_error)) + __Pyx_TraceLine(263,0,__PYX_ERR(0, 263, __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":246 + /* "hunter/_event.pyx":247 * * @property * def stdlib(self): # <<<<<<<<<<<<<< @@ -6291,7 +6302,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6stdlib___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":265 +/* "hunter/_event.pyx":266 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -6354,28 +6365,28 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 265, 0, __PYX_ERR(0, 265, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 266, 0, __PYX_ERR(0, 266, __pyx_L1_error)); - /* "hunter/_event.pyx":268 + /* "hunter/_event.pyx":269 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< * try: * self._fullsource = None */ - __Pyx_TraceLine(268,0,__PYX_ERR(0, 268, __pyx_L1_error)) + __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __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":269 + /* "hunter/_event.pyx":270 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< * self._fullsource = None * */ - __Pyx_TraceLine(269,0,__PYX_ERR(0, 269, __pyx_L1_error)) + __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6385,64 +6396,64 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "hunter/_event.pyx":270 + /* "hunter/_event.pyx":271 * if self._fullsource is UNSET: * try: * self._fullsource = None # <<<<<<<<<<<<<< * * if self.kind == 'call' and self.frame.f_code.co_name != "": */ - __Pyx_TraceLine(270,0,__PYX_ERR(0, 270, __pyx_L4_error)) + __Pyx_TraceLine(271,0,__PYX_ERR(0, 271, __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":272 + /* "hunter/_event.pyx":273 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< * lines = [] * try: */ - __Pyx_TraceLine(272,0,__PYX_ERR(0, 272, __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, 272, __pyx_L4_error) + __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __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, 273, __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, 272, __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, 273, __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, 272, __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, 273, __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":273 + /* "hunter/_event.pyx":274 * * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] # <<<<<<<<<<<<<< * try: * for _, token, _, _, line in generate_tokens(partial( */ - __Pyx_TraceLine(273,0,__PYX_ERR(0, 273, __pyx_L4_error)) - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L4_error) + __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L4_error)) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_7); __pyx_v_lines = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "hunter/_event.pyx":274 + /* "hunter/_event.pyx":275 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< * for _, token, _, _, line in generate_tokens(partial( * next, */ - __Pyx_TraceLine(274,0,__PYX_ERR(0, 274, __pyx_L4_error)) + __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L4_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -6452,45 +6463,45 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "hunter/_event.pyx":275 + /* "hunter/_event.pyx":276 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L13_error)) - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 275, __pyx_L13_error) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_generate_tokens); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 276, __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, 275, __pyx_L13_error) + __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_partial); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 276, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_13); - /* "hunter/_event.pyx":276 + /* "hunter/_event.pyx":277 * try: * for _, token, _, _, line in generate_tokens(partial( * next, # <<<<<<<<<<<<<< * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): */ - __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L13_error)) - __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 276, __pyx_L13_error) + __Pyx_TraceLine(277,0,__PYX_ERR(0, 277, __pyx_L13_error)) + __pyx_t_14 = __Pyx_GetBuiltinName(__pyx_n_s_next); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 277, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_14); - /* "hunter/_event.pyx":277 + /* "hunter/_event.pyx":278 * 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(277,0,__PYX_ERR(0, 277, __pyx_L13_error)) - __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 277, __pyx_L13_error) + __Pyx_TraceLine(278,0,__PYX_ERR(0, 278, __pyx_L13_error)) + __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_yield_lines); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 278, __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, 277, __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, 278, __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, 277, __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, 278, __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, 277, __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, 278, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; @@ -6508,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, 277, __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, 278, __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; @@ -6518,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, 277, __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, 278, __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; @@ -6526,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, 277, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(4+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 278, __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; @@ -6543,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, 277, __pyx_L13_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_21, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 278, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6563,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, 275, __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, 276, __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; @@ -6573,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, 275, __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, 276, __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; @@ -6581,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, 275, __pyx_L13_error) + __pyx_t_21 = PyTuple_New(2+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 276, __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; @@ -6592,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, 275, __pyx_L13_error) + __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_21, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 276, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0; } @@ -6610,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, 275, __pyx_L13_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 276, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":275 + /* "hunter/_event.pyx":276 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L13_error)) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __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, 275, __pyx_L13_error) + __pyx_t_22 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 276, __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, 275, __pyx_L13_error) + __pyx_t_23 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 276, __pyx_L13_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -6636,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, 275, __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, 276, __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, 275, __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, 276, __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, 275, __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, 276, __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, 275, __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, 276, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -6656,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, 275, __pyx_L13_error) + else __PYX_ERR(0, 276, __pyx_L13_error) } break; } @@ -6668,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, 275, __pyx_L13_error) + __PYX_ERR(0, 276, __pyx_L13_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6694,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, 275, __pyx_L13_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 276, __pyx_L13_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -6704,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, 275, __pyx_L13_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 276, __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; @@ -6713,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, 275, __pyx_L13_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_16), 5) < 0) __PYX_ERR(0, 276, __pyx_L13_error) __pyx_t_24 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L22_unpacking_done; @@ -6721,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, 275, __pyx_L13_error) + __PYX_ERR(0, 276, __pyx_L13_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_12); @@ -6735,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":279 + /* "hunter/_event.pyx":280 * 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(279,0,__PYX_ERR(0, 279, __pyx_L13_error)) + __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __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, 279, __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, 280, __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, 279, __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, 280, __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, 279, __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, 280, __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":280 + /* "hunter/_event.pyx":281 * )): * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) # <<<<<<<<<<<<<< * break * except TokenError: */ - __Pyx_TraceLine(280,0,__PYX_ERR(0, 280, __pyx_L13_error)) - __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 280, __pyx_L13_error) + __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L13_error)) + __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__5, __pyx_v_lines); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 281, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __Pyx_GOTREF(__pyx_v_self->_fullsource); @@ -6780,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":281 + /* "hunter/_event.pyx":282 * if token in ("def", "class", "lambda"): * self._fullsource = ''.join(lines) * break # <<<<<<<<<<<<<< * except TokenError: * pass */ - __Pyx_TraceLine(281,0,__PYX_ERR(0, 281, __pyx_L13_error)) + __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L13_error)) goto __pyx_L20_break; - /* "hunter/_event.pyx":279 + /* "hunter/_event.pyx":280 * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) * )): * if token in ("def", "class", "lambda"): # <<<<<<<<<<<<<< @@ -6799,19 +6810,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":275 + /* "hunter/_event.pyx":276 * lines = [] * try: * for _, token, _, _, line in generate_tokens(partial( # <<<<<<<<<<<<<< * next, * yield_lines(self.filename, self.frame.f_globals, self.lineno - 1, lines) */ - __Pyx_TraceLine(275,0,__PYX_ERR(0, 275, __pyx_L13_error)) + __Pyx_TraceLine(276,0,__PYX_ERR(0, 276, __pyx_L13_error)) } __pyx_L20_break:; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "hunter/_event.pyx":274 + /* "hunter/_event.pyx":275 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6836,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":282 + /* "hunter/_event.pyx":283 * self._fullsource = ''.join(lines) * break * except TokenError: # <<<<<<<<<<<<<< * pass * if self._fullsource is None: */ - __Pyx_TraceLine(282,0,__PYX_ERR(0, 282, __pyx_L15_except_error)) + __Pyx_TraceLine(283,0,__PYX_ERR(0, 283, __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, 282, __pyx_L15_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_TokenError); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 283, __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; @@ -6858,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":274 + /* "hunter/_event.pyx":275 * if self.kind == 'call' and self.frame.f_code.co_name != "": * lines = [] * try: # <<<<<<<<<<<<<< @@ -6878,7 +6889,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L18_try_end:; } - /* "hunter/_event.pyx":272 + /* "hunter/_event.pyx":273 * self._fullsource = None * * if self.kind == 'call' and self.frame.f_code.co_name != "": # <<<<<<<<<<<<<< @@ -6887,31 +6898,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":284 + /* "hunter/_event.pyx":285 * 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(284,0,__PYX_ERR(0, 284, __pyx_L4_error)) + __Pyx_TraceLine(285,0,__PYX_ERR(0, 285, __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":285 + /* "hunter/_event.pyx":286 * 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(285,0,__PYX_ERR(0, 285, __pyx_L4_error)) - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 285, __pyx_L4_error) + __Pyx_TraceLine(286,0,__PYX_ERR(0, 286, __pyx_L4_error)) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_getline); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 286, __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, 285, __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, 286, __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, 285, __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, 286, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_21 = NULL; __pyx_t_20 = 0; @@ -6928,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, 285, __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, 286, __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; @@ -6938,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, 285, __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, 286, __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; @@ -6946,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, 285, __pyx_L4_error) + __pyx_t_13 = PyTuple_New(3+__pyx_t_20); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 286, __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; @@ -6960,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, 285, __pyx_L4_error) + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 286, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -6971,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":284 + /* "hunter/_event.pyx":285 * except TokenError: * pass * if self._fullsource is None: # <<<<<<<<<<<<<< @@ -6980,7 +6991,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":269 + /* "hunter/_event.pyx":270 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -7005,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":286 + /* "hunter/_event.pyx":287 * 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(286,0,__PYX_ERR(0, 286, __pyx_L6_except_error)) + __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __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, 286, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_7, &__pyx_t_13) < 0) __PYX_ERR(0, 287, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_13); @@ -7024,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":287 + /* "hunter/_event.pyx":288 * 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(287,0,__PYX_ERR(0, 287, __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, 287, __pyx_L33_error) + __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __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, 288, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_21 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) { @@ -7046,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, 287, __pyx_L33_error) + if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 288, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GIVEREF(__pyx_t_15); @@ -7056,14 +7067,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_t_15 = 0; } - /* "hunter/_event.pyx":286 + /* "hunter/_event.pyx":287 * 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(286,0,__PYX_ERR(0, 286, __pyx_L33_error)) + __Pyx_TraceLine(287,0,__PYX_ERR(0, 287, __pyx_L33_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7120,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":269 + /* "hunter/_event.pyx":270 * * if self._fullsource is UNSET: * try: # <<<<<<<<<<<<<< @@ -7140,7 +7151,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p __pyx_L9_try_end:; } - /* "hunter/_event.pyx":268 + /* "hunter/_event.pyx":269 * cdef list lines * * if self._fullsource is UNSET: # <<<<<<<<<<<<<< @@ -7149,20 +7160,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p */ } - /* "hunter/_event.pyx":288 + /* "hunter/_event.pyx":289 * except Exception as exc: * self._fullsource = "??? NO SOURCE: {!r}".format(exc) * return self._fullsource # <<<<<<<<<<<<<< * * @property */ - __Pyx_TraceLine(288,0,__PYX_ERR(0, 288, __pyx_L1_error)) + __Pyx_TraceLine(289,0,__PYX_ERR(0, 289, __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":265 + /* "hunter/_event.pyx":266 * * @property * def fullsource(self): # <<<<<<<<<<<<<< @@ -7197,7 +7208,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10fullsource___get__(struct __p return __pyx_r; } -/* "hunter/_event.pyx":291 +/* "hunter/_event.pyx":292 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7249,31 +7260,31 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[0], 291, 0, __PYX_ERR(0, 291, __pyx_L1_error)); + __Pyx_TraceCall("__get__", __pyx_f[0], 292, 0, __PYX_ERR(0, 292, __pyx_L1_error)); - /* "hunter/_event.pyx":292 + /* "hunter/_event.pyx":293 * @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(292,0,__PYX_ERR(0, 292, __pyx_L1_error)) + __Pyx_TraceLine(293,0,__PYX_ERR(0, 293, __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":293 + /* "hunter/_event.pyx":294 * 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(293,0,__PYX_ERR(0, 293, __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, 293, __pyx_L1_error) + __Pyx_TraceLine(294,0,__PYX_ERR(0, 294, __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, 294, __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, 293, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -7288,28 +7299,28 @@ 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_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, 293, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __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, 293, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "hunter/_event.pyx":294 + /* "hunter/_event.pyx":295 * 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(294,0,__PYX_ERR(0, 294, __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, 294, __pyx_L1_error) + __Pyx_TraceLine(295,0,__PYX_ERR(0, 295, __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, 295, __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, 294, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_splitext); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 295, __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, 294, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_basename); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 295, __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, 294, __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, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { @@ -7324,7 +7335,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, 294, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -7340,10 +7351,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, 294, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __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, 294, __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, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -7359,7 +7370,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, 294, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_3); @@ -7368,7 +7379,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":293 + /* "hunter/_event.pyx":294 * def source(self): * if self._source is UNSET: * if self.filename.endswith(('.so', '.pyd')): # <<<<<<<<<<<<<< @@ -7377,14 +7388,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":295 + /* "hunter/_event.pyx":296 * 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(295,0,__PYX_ERR(0, 295, __pyx_L1_error)) + __Pyx_TraceLine(296,0,__PYX_ERR(0, 296, __pyx_L1_error)) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -7394,19 +7405,19 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "hunter/_event.pyx":296 + /* "hunter/_event.pyx":297 * 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(296,0,__PYX_ERR(0, 296, __pyx_L5_error)) - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __pyx_L5_error) + __Pyx_TraceLine(297,0,__PYX_ERR(0, 297, __pyx_L5_error)) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_getline); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __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, 296, __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, 297, __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, 296, __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, 297, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = NULL; __pyx_t_14 = 0; @@ -7423,7 +7434,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, 296, __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, 297, __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; @@ -7433,7 +7444,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, 296, __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, 297, __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; @@ -7441,7 +7452,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, 296, __pyx_L5_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 297, __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; @@ -7455,7 +7466,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, 296, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 297, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -7466,7 +7477,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":295 + /* "hunter/_event.pyx":296 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7488,18 +7499,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":297 + /* "hunter/_event.pyx":298 * 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(297,0,__PYX_ERR(0, 297, __pyx_L7_except_error)) + __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __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, 297, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 298, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); @@ -7507,15 +7518,15 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_v_exc = __pyx_t_5; /*try:*/ { - /* "hunter/_event.pyx":298 + /* "hunter/_event.pyx":299 * 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(298,0,__PYX_ERR(0, 298, __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, 298, __pyx_L16_error) + __Pyx_TraceLine(299,0,__PYX_ERR(0, 299, __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, 299, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -7529,7 +7540,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, 298, __pyx_L16_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -7539,14 +7550,14 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_t_4 = 0; } - /* "hunter/_event.pyx":297 + /* "hunter/_event.pyx":298 * 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(297,0,__PYX_ERR(0, 297, __pyx_L16_error)) + __Pyx_TraceLine(298,0,__PYX_ERR(0, 298, __pyx_L16_error)) /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_exc); @@ -7600,7 +7611,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":295 + /* "hunter/_event.pyx":296 * if self.filename.endswith(('.so', '.pyd')): * self._source = "??? NO SOURCE: not reading {} file".format(splitext(basename(self.filename))[1]) * try: # <<<<<<<<<<<<<< @@ -7620,7 +7631,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob __pyx_L10_try_end:; } - /* "hunter/_event.pyx":292 + /* "hunter/_event.pyx":293 * @property * def source(self): * if self._source is UNSET: # <<<<<<<<<<<<<< @@ -7629,20 +7640,20 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob */ } - /* "hunter/_event.pyx":300 + /* "hunter/_event.pyx":301 * self._source = "??? NO SOURCE: {!r}".format(exc) * * return self._source # <<<<<<<<<<<<<< * * def __getitem__(self, item): */ - __Pyx_TraceLine(300,0,__PYX_ERR(0, 300, __pyx_L1_error)) + __Pyx_TraceLine(301,0,__PYX_ERR(0, 301, __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":291 + /* "hunter/_event.pyx":292 * * @property * def source(self): # <<<<<<<<<<<<<< @@ -7670,7 +7681,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6source___get__(struct __pyx_ob return __pyx_r; } -/* "hunter/_event.pyx":302 +/* "hunter/_event.pyx":303 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7700,24 +7711,24 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_6__getitem__(struct __pyx_obj_6 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - __Pyx_TraceCall("__getitem__", __pyx_f[0], 302, 0, __PYX_ERR(0, 302, __pyx_L1_error)); + __Pyx_TraceCall("__getitem__", __pyx_f[0], 303, 0, __PYX_ERR(0, 303, __pyx_L1_error)); - /* "hunter/_event.pyx":303 + /* "hunter/_event.pyx":304 * * def __getitem__(self, item): * return getattr(self, item) # <<<<<<<<<<<<<< * * */ - __Pyx_TraceLine(303,0,__PYX_ERR(0, 303, __pyx_L1_error)) + __Pyx_TraceLine(304,0,__PYX_ERR(0, 304, __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, 303, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_event.pyx":302 + /* "hunter/_event.pyx":303 * return self._source * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -7930,7 +7941,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5depth___get__(struct __pyx_obj * readonly int depth * readonly int calls # <<<<<<<<<<<<<< * readonly bint threading_support - * + * readonly bint detached */ /* Python wrapper */ @@ -7979,8 +7990,8 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_5calls___get__(struct __pyx_obj * readonly int depth * readonly int calls * readonly bint threading_support # <<<<<<<<<<<<<< + * readonly bint detached * - * bint detached */ /* Python wrapper */ @@ -8025,6 +8036,56 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_17threading_support___get__(str return __pyx_r; } +/* "hunter/_event.pxd":19 + * readonly int calls + * readonly bint threading_support + * readonly bint detached # <<<<<<<<<<<<<< + * + * object _code + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_6_event_5Event_8detached_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_6_event_5Event_8detached_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_6_event_5Event_8detached___get__(((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_8detached___get__(struct __pyx_obj_6hunter_6_event_Event *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 19, 0, __PYX_ERR(1, 19, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->detached); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 19, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._event.Event.detached.__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 @@ -8523,7 +8584,7 @@ static PyObject *__pyx_pf_6hunter_6_event_5Event_10__setstate_cython__(struct __ } 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":306 +/* "hunter/_event.pyx":307 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -8576,19 +8637,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, 306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 1); __PYX_ERR(0, 307, __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, 306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 2); __PYX_ERR(0, 307, __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, 306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, 3); __PYX_ERR(0, 307, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -8598,7 +8659,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, 306, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "yield_lines") < 0)) __PYX_ERR(0, 307, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -8620,13 +8681,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, 306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("yield_lines", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 307, __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, 306, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_collector), (&PyList_Type), 1, "collector", 1))) __PYX_ERR(0, 307, __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 */ @@ -8650,7 +8711,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, 306, __pyx_L1_error) + __PYX_ERR(0, 307, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -8670,7 +8731,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__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, 306, __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, 307, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -8708,7 +8769,7 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("yield_lines", 0); __Pyx_TraceFrameInit(__pyx_codeobj__12) - __Pyx_TraceCall("yield_lines", __pyx_f[0], 306, 0, __PYX_ERR(0, 306, __pyx_L1_error)); + __Pyx_TraceCall("yield_lines", __pyx_f[0], 307, 0, __PYX_ERR(0, 307, __pyx_L1_error)); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L7_resume_from_yield; @@ -8718,39 +8779,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, 306, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 307, __pyx_L1_error) - /* "hunter/_event.pyx":308 + /* "hunter/_event.pyx":309 * 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(308,0,__PYX_ERR(0, 308, __pyx_L1_error)) + __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error)) __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_dedent = Py_None; - /* "hunter/_event.pyx":309 + /* "hunter/_event.pyx":310 * limit=10): * dedent = None * amount = 0 # <<<<<<<<<<<<<< * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: */ - __Pyx_TraceLine(309,0,__PYX_ERR(0, 309, __pyx_L1_error)) + __Pyx_TraceLine(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) __pyx_cur_scope->__pyx_v_amount = 0; - /* "hunter/_event.pyx":310 + /* "hunter/_event.pyx":311 * 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(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) + __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getlines); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -8767,7 +8828,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, 310, __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, 311, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -8775,13 +8836,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, 310, __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, 311, __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, 310, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 311, __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; @@ -8792,14 +8853,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, 310, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __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, 310, __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, 311, __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, 310, __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, 311, __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; @@ -8807,9 +8868,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, 310, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __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, 310, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 311, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -8817,17 +8878,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, 310, __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, 311, __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, 310, __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, 311, __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, 310, __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, 311, __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, 310, __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, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -8837,7 +8898,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, 310, __pyx_L1_error) + else __PYX_ERR(0, 311, __pyx_L1_error) } break; } @@ -8848,29 +8909,29 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":311 + /* "hunter/_event.pyx":312 * 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(311,0,__PYX_ERR(0, 311, __pyx_L1_error)) + __Pyx_TraceLine(312,0,__PYX_ERR(0, 312, __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":312 + /* "hunter/_event.pyx":313 * 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(312,0,__PYX_ERR(0, 312, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L1_error) + __Pyx_TraceLine(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LEADING_WHITESPACE_RE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __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, 312, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -8885,7 +8946,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, 312, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 313, __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); @@ -8893,17 +8954,17 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":313 + /* "hunter/_event.pyx":314 * 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(313,0,__PYX_ERR(0, 313, __pyx_L1_error)) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 313, __pyx_L1_error) + __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __pyx_L1_error)) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dedent); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 314, __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, 313, __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, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -8916,18 +8977,18 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - /* "hunter/_event.pyx":314 + /* "hunter/_event.pyx":315 * dedent = LEADING_WHITESPACE_RE.findall(line) * dedent = dedent[0] if dedent else "" * amount = len(dedent) # <<<<<<<<<<<<<< * elif not line.startswith(dedent): * break */ - __Pyx_TraceLine(314,0,__PYX_ERR(0, 314, __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, 314, __pyx_L1_error) + __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __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, 315, __pyx_L1_error) __pyx_cur_scope->__pyx_v_amount = __pyx_t_10; - /* "hunter/_event.pyx":311 + /* "hunter/_event.pyx":312 * amount = 0 * for line in getlines(filename, module_globals)[start:start + limit]: * if dedent is None: # <<<<<<<<<<<<<< @@ -8937,15 +8998,15 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py goto __pyx_L6; } - /* "hunter/_event.pyx":315 + /* "hunter/_event.pyx":316 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< * break * collector.append(line) */ - __Pyx_TraceLine(315,0,__PYX_ERR(0, 315, __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, 315, __pyx_L1_error) + __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __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, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -8959,25 +9020,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, 315, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __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, 315, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 316, __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":316 + /* "hunter/_event.pyx":317 * amount = len(dedent) * elif not line.startswith(dedent): * break # <<<<<<<<<<<<<< * collector.append(line) * yield line[amount:] */ - __Pyx_TraceLine(316,0,__PYX_ERR(0, 316, __pyx_L1_error)) + __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) goto __pyx_L5_break; - /* "hunter/_event.pyx":315 + /* "hunter/_event.pyx":316 * dedent = dedent[0] if dedent else "" * amount = len(dedent) * elif not line.startswith(dedent): # <<<<<<<<<<<<<< @@ -8987,26 +9048,26 @@ static PyObject *__pyx_gb_6hunter_6_event_2generator(__pyx_CoroutineObject *__py } __pyx_L6:; - /* "hunter/_event.pyx":317 + /* "hunter/_event.pyx":318 * elif not line.startswith(dedent): * break * collector.append(line) # <<<<<<<<<<<<<< * yield line[amount:] */ - __Pyx_TraceLine(317,0,__PYX_ERR(0, 317, __pyx_L1_error)) + __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __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, 317, __pyx_L1_error) + __PYX_ERR(0, 318, __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, 317, __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, 318, __pyx_L1_error) - /* "hunter/_event.pyx":318 + /* "hunter/_event.pyx":319 * break * collector.append(line) * yield line[amount:] # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(318,0,__PYX_ERR(0, 318, __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, 318, __pyx_L1_error) + __Pyx_TraceLine(319,0,__PYX_ERR(0, 319, __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, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -9027,22 +9088,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, 318, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 319, __pyx_L1_error) - /* "hunter/_event.pyx":310 + /* "hunter/_event.pyx":311 * 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(310,0,__PYX_ERR(0, 310, __pyx_L1_error)) + __Pyx_TraceLine(311,0,__PYX_ERR(0, 311, __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":306 + /* "hunter/_event.pyx":307 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< @@ -9942,6 +10003,10 @@ static PyObject *__pyx_getprop_6hunter_6_event_5Event_threading_support(PyObject return __pyx_pw_6hunter_6_event_5Event_17threading_support_1__get__(o); } +static PyObject *__pyx_getprop_6hunter_6_event_5Event_detached(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_6hunter_6_event_5Event_8detached_1__get__(o); +} + static PyMethodDef __pyx_methods_6hunter_6_event_Event[] = { {"detach", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_6_event_5Event_3detach, METH_VARARGS|METH_KEYWORDS, 0}, {"clone", (PyCFunction)__pyx_pw_6hunter_6_event_5Event_5clone, METH_NOARGS, 0}, @@ -9970,6 +10035,7 @@ static struct PyGetSetDef __pyx_getsets_6hunter_6_event_Event[] = { {(char *)"depth", __pyx_getprop_6hunter_6_event_5Event_depth, 0, (char *)0, 0}, {(char *)"calls", __pyx_getprop_6hunter_6_event_5Event_calls, 0, (char *)0, 0}, {(char *)"threading_support", __pyx_getprop_6hunter_6_event_5Event_threading_support, 0, (char *)0, 0}, + {(char *)"detached", __pyx_getprop_6hunter_6_event_5Event_detached, 0, (char *)0, 0}, {0, 0, 0, 0, 0} }; @@ -10389,58 +10455,58 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "hunter/_event.pyx":204 + /* "hunter/_event.pyx":205 * def module(self): * if self._module is UNSET: * module = self.frame.f_globals.get('__name__', '') # <<<<<<<<<<<<<< * if module is None: * module = '' */ - __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 204, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_s_name_2, __pyx_kp_s__5); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "hunter/_event.pyx":219 + /* "hunter/_event.pyx":220 * if not filename: * filename = '' * elif filename.endswith(('.pyc', '.pyo')): # <<<<<<<<<<<<<< * filename = filename[:-1] * elif filename.endswith(('.so', '.pyd')): */ - __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(2, __pyx_kp_s_pyc, __pyx_kp_s_pyo); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "hunter/_event.pyx":220 + /* "hunter/_event.pyx":221 * filename = '' * elif filename.endswith(('.pyc', '.pyo')): * filename = filename[:-1] # <<<<<<<<<<<<<< * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) */ - __pyx_slice__8 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_slice__8 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8); - /* "hunter/_event.pyx":221 + /* "hunter/_event.pyx":222 * 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__9 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(2, __pyx_kp_s_so, __pyx_kp_s_pyd); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 222, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "hunter/_event.pyx":223 + /* "hunter/_event.pyx":224 * elif filename.endswith(('.so', '.pyd')): * basename = CYTHON_SUFFIX_RE.sub('', filename) * for ext in ('.pyx', '.py'): # <<<<<<<<<<<<<< * cyfilename = basename + ext * if exists(cyfilename): */ - __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 223, __pyx_L1_error) + __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s_pyx, __pyx_kp_s_py); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 224, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); @@ -10455,17 +10521,17 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "hunter/_event.pyx":306 + /* "hunter/_event.pyx":307 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __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, 306, __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, 307, __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, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 306, __pyx_L1_error) + __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, 307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 307, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_Event(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -10548,7 +10614,7 @@ static int __Pyx_modinit_type_init_code(void) { 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, 306, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines) < 0) __PYX_ERR(0, 307, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_6_event___pyx_scope_struct__yield_lines.tp_print = 0; #endif @@ -11249,17 +11315,17 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(109,0,__PYX_ERR(0, 109, __pyx_L1_error)) - /* "hunter/_event.pyx":306 + /* "hunter/_event.pyx":307 * * * def yield_lines(filename, module_globals, start, list collector, # <<<<<<<<<<<<<< * limit=10): * dedent = None */ - __Pyx_TraceLine(306,0,__PYX_ERR(0, 306, __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, 306, __pyx_L1_error) + __Pyx_TraceLine(307,0,__PYX_ERR(0, 307, __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, 307, __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, 306, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_yield_lines, __pyx_t_1) < 0) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":1 diff --git a/src/hunter/_event.pxd b/src/hunter/_event.pxd index 4f8daf7..852be0b 100644 --- a/src/hunter/_event.pxd +++ b/src/hunter/_event.pxd @@ -16,8 +16,8 @@ cdef class Event: readonly int depth readonly int calls readonly bint threading_support + readonly bint detached - bint detached object _code object _filename object _fullsource diff --git a/src/hunter/_event.pyx b/src/hunter/_event.pyx index c638532..93daa9b 100644 --- a/src/hunter/_event.pyx +++ b/src/hunter/_event.pyx @@ -114,6 +114,7 @@ cdef class Event: event.depth = self.depth event.calls = self.calls event.threading_support = self.threading_support + event.detached = False event._code = self._code event._filename = self._filename event._fullsource = self._fullsource diff --git a/tests/test_integration.py b/tests/test_integration.py index dff599b..16f3a59 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -683,7 +683,7 @@ def test_backlog_subprocess(LineMatcher): print(re.sub(r'([\[\]])', r'[\1]', output)) print(output) lm = LineMatcher(output.splitlines()) - lm.fnmatch_lines(convert_num_calls_to_pure_or_cython([ + lm.fnmatch_lines([ "depth=0 calls=1 *sample7args.py:4 call => one(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", "depth=1 calls=2 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", "depth=1 calls=2 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", @@ -732,4 +732,4 @@ def test_backlog_subprocess(LineMatcher): "depth=5 calls=17 *sample7args.py:33 line for i in range(1): # five", "depth=5 calls=17 *sample7args.py:34 line return i # five", "depth=4 calls=17 *sample7args.py:34 return <= five: 0", - ])) + ]) From d31f1b3e839137b7ac0385f128c29972646bf1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 12:15:06 +0300 Subject: [PATCH 33/38] Move at the end and apply some fixups. --- src/hunter/_predicates.pyx | 272 ++++++++++++++++++------------------- src/hunter/predicates.py | 2 +- 2 files changed, 137 insertions(+), 137 deletions(-) diff --git a/src/hunter/_predicates.pyx b/src/hunter/_predicates.pyx index 4749552..ac69a24 100644 --- a/src/hunter/_predicates.pyx +++ b/src/hunter/_predicates.pyx @@ -394,142 +394,6 @@ cdef inline fast_From_call(From self, Event event): return fast_call(self.predicate, relative_event) -@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): - raise TypeError("Action %r must be a ColorStreamAction." % self.action) - self.condition = condition - self.queue = deque(maxlen=size) - self.size = size - self.stack = stack - self.strip = strip - self.vars = vars - self._filter = filter - - def __call__(self, event): - return fast_Backlog_call(self, event) - - 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 - ) - - def __repr__(self): - return '' % ( - self.condition, self.size, self.stack, self.vars, self.action, self._filter - ) - - def __eq__(self, other): - return ( - isinstance(other, Backlog) and - self.condition == ( other).condition and - self.size == ( other).size and - self.stack == ( other).stack and - self.vars == ( other).vars and - self.action == ( other).action - ) - - def __hash__(self): - return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) - - def __or__(self, other): - return Or(self, other) - - def __and__(self, other): - 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 __ror__(self, other): - return Or(other, self) - - def __rand__(self, other): - return And(other, self) - - def filter(self, *args, **kwargs): - from hunter import _merge - - if self.filter is not None: - args = (self.filter,) + args - - return Backlog( - self.condition, - size=self.size, stack=self.stack, vars=self.vars, action=self.action, - filter=_merge(*args, **kwargs) - ) - -cdef inline fast_Backlog_call(Backlog self, Event event): - cdef bint first_is_call - cdef Event detached_event - cdef Event first_event - cdef Event stack_event - cdef FrameType first_frame - cdef FrameType frame - cdef int backlog_call_depth - cdef int depth_delta - cdef int first_depth - cdef int missing_depth - cdef object result - cdef object stack_events - - result = fast_call(self.condition, event) - if result: - if self.queue: - self.action.cleanup() - - first_event = self.queue[0] - first_depth = first_event.depth - backlog_call_depth = event.depth - first_depth - first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid - 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: - first_frame = first_event.frame - if first_frame is not None: - stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full - frame = first_frame - depth_delta = 0 - while 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 - ) - if not self.vars: - # noinspection PyPropertyAccess - stack_event._locals = {} - stack_event._globals = {} - stack_event.detached = True - stack_events.appendleft(stack_event) - frame = frame.f_back - depth_delta += 1 - for stack_event in stack_events: - if self._filter is None or self._filter(stack_event): - self.action(stack_event) - for backlog_event in self.queue: - if self._filter is None: - self.action(backlog_event) - elif self._filter(backlog_event): - self.action(backlog_event) - 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. - 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 - self.queue.append(detached_event) - - return result - - @cython.final cdef class And: """ @@ -696,3 +560,139 @@ cdef inline fast_call(callable, Event event): return fast_Backlog_call( callable, event) else: return callable(event) + + +@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): + raise TypeError("Action %r must be a ColorStreamAction." % self.action) + self.condition = condition + self.queue = deque(maxlen=size) + self.size = size + self.stack = stack + self.strip = strip + self.vars = vars + self._filter = filter + + def __call__(self, event): + return fast_Backlog_call(self, event) + + 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 + ) + + def __repr__(self): + return '' % ( + self.condition, self.size, self.stack, self.vars, self.action, self._filter + ) + + def __eq__(self, other): + return ( + isinstance(other, Backlog) and + self.condition == ( other).condition and + self.size == ( other).size and + self.stack == ( other).stack and + self.vars == ( other).vars and + self.action == ( other).action + ) + + def __hash__(self): + return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) + + def __or__(self, other): + return Or(self, other) + + def __and__(self, other): + 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 __ror__(self, other): + return Or(other, self) + + def __rand__(self, other): + return And(other, self) + + def filter(self, *args, **kwargs): + from hunter import _merge + + if self.filter is not None: + args = (self.filter,) + args + + return Backlog( + self.condition, + size=self.size, stack=self.stack, vars=self.vars, action=self.action, + filter=_merge(*args, **kwargs) + ) + +cdef inline fast_Backlog_call(Backlog self, Event event): + cdef bint first_is_call + cdef Event detached_event + cdef Event first_event + cdef Event stack_event + cdef FrameType first_frame + cdef FrameType frame + cdef int backlog_call_depth + cdef int depth_delta + cdef int first_depth + cdef int missing_depth + cdef object result + cdef object stack_events + + result = fast_call(self.condition, event) + if result: + if self.queue: + self.action.cleanup() + + first_event = self.queue[0] + first_depth = first_event.depth + backlog_call_depth = event.depth - first_depth + first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid + missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + if missing_depth: + if first_is_call and first_event.frame is not None: + first_frame = first_event.frame.f_back + else: + first_frame = first_event.frame + if first_frame is not None: + stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + frame = first_frame + depth_delta = 0 + while 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 + ) + if not self.vars: + # noinspection PyPropertyAccess + stack_event._locals = {} + stack_event._globals = {} + stack_event.detached = True + stack_events.appendleft(stack_event) + frame = frame.f_back + depth_delta += 1 + for stack_event in stack_events: + if self._filter is None or self._filter(stack_event): + self.action(stack_event) + for backlog_event in self.queue: + if self._filter is None: + self.action(backlog_event) + elif fast_call(self._filter, backlog_event): + self.action(backlog_event) + 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. + 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 + self.queue.append(detached_event) + + return result diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index 3f62156..b3e34ff 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -683,7 +683,7 @@ def __call__(self, event): first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) if missing_depth: - if first_is_call: + if first_is_call and first_event.frame is not None: first_frame = first_event.frame.f_back else: first_frame = first_event.frame From fa35263818fa95ad25948eefd2269190d7d4a029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 12:15:28 +0300 Subject: [PATCH 34/38] Fix quoting (the rest of the project is sq). --- src/hunter/__init__.py | 78 +++++++++++++++++++++--------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 29b9288..5b39bdf 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -18,8 +18,8 @@ from .actions import VarsPrinter from .actions import VarsSnooper try: - if os.environ.get("PUREPYTHONHUNTER"): - raise ImportError("Cython speedups are disabled.") + if os.environ.get('PUREPYTHONHUNTER'): + raise ImportError('Cython speedups are disabled.') from ._event import Event from ._predicates import And as _And @@ -69,9 +69,9 @@ 'trace', ) THREADING_SUPPORT_ALIASES = ( - "threading_support", "threads_support", "thread_support", - "threadingsupport", "threadssupport", "threadsupport", - "threading", "threads", "thread", + 'threading_support', 'threads_support', 'thread_support', + 'threadingsupport', 'threadssupport', 'threadsupport', + 'threading', 'threads', 'thread', ) _last_tracer = None _default_trace_args = None @@ -86,20 +86,20 @@ def _prepare_config(*args, **kwargs): predicates = [] for key, value in list(_default_config.items()): - if key in THREADING_SUPPORT_ALIASES or key == "clear_env_var": + if key in THREADING_SUPPORT_ALIASES or key == 'clear_env_var': options[key] = _default_config.pop(key) continue elif key in ( # builtin actions config - "klass", - "stream", - "force_colors", - "force_pid", - "filename_alignment", - "thread_alignment", - "pid_alignment", - "repr_limit", - "repr_func", + 'klass', + 'stream', + 'force_colors', + 'force_pid', + 'filename_alignment', + 'thread_alignment', + 'pid_alignment', + 'repr_limit', + 'repr_func', ): continue @@ -112,13 +112,13 @@ def _prepare_config(*args, **kwargs): continue _default_config.pop(key) - sys.stderr.write("Discarded config from PYTHONHUNTERCONFIG {}={!r}: Unknown option\n".format( + sys.stderr.write('Discarded config from PYTHONHUNTERCONFIG {}={!r}: Unknown option\n'.format( key, value)) for position, predicate in enumerate(args): if callable(predicate): predicates.append(predicate) else: - sys.stderr.write("Discarded config from PYTHONHUNTERCONFIG {} (position {}): Not a callable\n".format( + sys.stderr.write('Discarded config from PYTHONHUNTERCONFIG {} (position {}): Not a callable\n'.format( predicate, position)) return predicates, options @@ -133,17 +133,17 @@ def Q(*predicates, **query): See Also: :class:`hunter.predicates.Query` """ - optional_actions = query.pop("actions", []) - if "action" in query: - optional_actions.append(query.pop("action")) + optional_actions = query.pop('actions', []) + if 'action' in query: + optional_actions.append(query.pop('action')) for p in predicates: if not callable(p): - raise TypeError("Predicate {0!r} is not callable.".format(p)) + raise TypeError('Predicate {0!r} is not callable.'.format(p)) for a in optional_actions: if not callable(a): - raise TypeError("Action {0!r} is not callable.".format(a)) + raise TypeError('Action {0!r} is not callable.'.format(a)) if predicates: predicates = tuple( @@ -285,14 +285,14 @@ def From(condition=None, predicate=None, watermark=0, **kwargs): def Backlog(*conditions, **kwargs): - action = kwargs.pop("action", CallPrinter) - filter = kwargs.pop("filter", None) - size = kwargs.pop("size", 100) - stack = kwargs.pop("stack", 10) - strip = kwargs.pop("strip", True) - vars = kwargs.pop("vars", False) + action = kwargs.pop('action', CallPrinter) + filter = kwargs.pop('filter', None) + size = kwargs.pop('size', 100) + stack = kwargs.pop('stack', 10) + strip = kwargs.pop('strip', True) + vars = kwargs.pop('vars', False) if not conditions and not kwargs: - raise TypeError("Backlog needs at least 1 condition.") + raise TypeError('Backlog needs at least 1 condition.') return _Backlog(_merge(*conditions, **kwargs), size=size, stack=stack, vars=vars, strip=strip, action=action, filter=filter) @@ -303,7 +303,7 @@ def stop(): global _last_tracer if _last_tracer is None: - warnings.warn("There is no tracer to stop.") + warnings.warn('There is no tracer to stop.') else: _last_tracer.stop() _last_tracer = None @@ -315,8 +315,8 @@ def __call__(self, event): def _prepare_predicate(*predicates, **options): - if "action" not in options and "actions" not in options: - options["action"] = CallPrinter + if 'action' not in options and 'actions' not in options: + options['action'] = CallPrinter return Q(*predicates, **options) @@ -360,7 +360,7 @@ def trace(*predicates, **options): predicates, options = _apply_config(predicates, options) - clear_env_var = options.pop("clear_env_var", False) + clear_env_var = options.pop('clear_env_var', False) threading_support = None for alias in THREADING_SUPPORT_ALIASES: if alias in options: @@ -368,7 +368,7 @@ def trace(*predicates, **options): predicate = _prepare_predicate(*predicates, **options) if clear_env_var: - os.environ.pop("PYTHONHUNTER", None) + os.environ.pop('PYTHONHUNTER', None) _last_tracer = Tracer(threading_support) @@ -408,14 +408,14 @@ def tracing_decorator(func): @functools.wraps(func) def tracing_wrapper(*args, **kwargs): predicates = [] - local = trace_options.pop("local", False) + local = trace_options.pop('local', False) if local: predicates.append(Query(depth_lt=2)) predicates.append( From( - Query(kind="call"), + Query(kind='call'), Not(When( - Query(calls_gt=0, depth=0) & Not(Query(kind="return")), + Query(calls_gt=0, depth=0) & Not(Query(kind='return')), Stop )), watermark=-1 @@ -441,9 +441,9 @@ def load_config(*args, **kwargs): if args or kwargs: _default_trace_args = _prepare_config(*args, **kwargs) else: - _default_trace_args = eval("_prepare_config({})".format(os.environ.get("PYTHONHUNTERCONFIG", ''))) + _default_trace_args = eval('_prepare_config({})'.format(os.environ.get('PYTHONHUNTERCONFIG', ''))) except Exception as exc: - sys.stderr.write("Failed to load hunter config from PYTHONHUNTERCONFIG {[PYTHONHUNTERCONFIG]!r}: {!r}\n".format( + sys.stderr.write('Failed to load hunter config from PYTHONHUNTERCONFIG {[PYTHONHUNTERCONFIG]!r}: {!r}\n'.format( os.environ, exc)) _default_trace_args = (), () From 23e6da7d03afdadf3f3fa728eb0f454b5a26afb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 14:00:49 +0300 Subject: [PATCH 35/38] Implement the test EvilTracer helper in cython and fix a bunch of testing problems like frames and other things missing on the copied events. --- src/hunter/_predicates.c | 12584 ++++++++++++++++++------------------ tests/eviltracer.pyx | 60 + tests/sample7args.py | 9 +- tests/setup.py | 4 +- tests/test_integration.py | 96 +- tests/test_tracer.py | 67 +- 6 files changed, 6439 insertions(+), 6381 deletions(-) create mode 100644 tests/eviltracer.pyx diff --git a/src/hunter/_predicates.c b/src/hunter/_predicates.c index c635e59..5c0c89a 100644 --- a/src/hunter/_predicates.c +++ b/src/hunter/_predicates.c @@ -1147,7 +1147,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_8_genexpr { }; -/* "hunter/_predicates.pyx":541 +/* "hunter/_predicates.pyx":405 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1160,7 +1160,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_9___str__ { }; -/* "hunter/_predicates.pyx":542 +/* "hunter/_predicates.pyx":406 * * def __str__(self): * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1176,7 +1176,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_10_genexpr { }; -/* "hunter/_predicates.pyx":594 +/* "hunter/_predicates.pyx":458 * self.predicates = predicates * * def __str__(self): # <<<<<<<<<<<<<< @@ -1189,7 +1189,7 @@ struct __pyx_obj_6hunter_11_predicates___pyx_scope_struct_11___str__ { }; -/* "hunter/_predicates.pyx":595 +/* "hunter/_predicates.pyx":459 * * def __str__(self): * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< @@ -1835,14 +1835,18 @@ static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* k #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) #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); +/* 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 +} /* ListAppend.proto */ #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS @@ -1861,25 +1865,21 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #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); + /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* append.proto */ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); -/* 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 *); @@ -2205,10 +2205,10 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_Backlog_call(s 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*/ +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state(struct __pyx_obj_6hunter_11_predicates_Backlog *, PyObject *); /*proto*/ #define __Pyx_MODULE_NAME "hunter._predicates" extern int __pyx_module_is_main_hunter___predicates; int __pyx_module_is_main_hunter___predicates = 0; @@ -2603,28 +2603,6 @@ 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_9condition___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* 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 */ @@ -2663,13 +2641,35 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_o static PyObject *__pyx_pf_6hunter_11_predicates_3Not_9predicate___get__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_18__reduce_cython__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self); /* proto */ 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); /* 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_9condition___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self); /* 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 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_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_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_12__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_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*/ @@ -12215,392 +12215,69 @@ static CYTHON_INLINE PyObject *__pyx_f_6hunter_11_predicates_fast_From_call(stru return __pyx_r; } -/* "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): +/* "hunter/_predicates.pyx":402 + * `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_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_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +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); - { - 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); + 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_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) { +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 - 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 399, 0, __PYX_ERR(0, 399, __pyx_L1_error)); + __Pyx_TraceCall("__init__", __pyx_f[0], 402, 0, __PYX_ERR(0, 402, __pyx_L1_error)); - /* "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 + /* "hunter/_predicates.pyx":403 + * """ + * def __init__(self, *predicates): + * self.predicates = predicates # <<<<<<<<<<<<<< + * + * def __str__(self): */ __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)) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_strip); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 407, __pyx_L1_error) - __pyx_v_self->strip = __pyx_t_7; - - /* "hunter/_predicates.pyx":408 - * self.stack = stack - * self.strip = strip - * self.vars = vars # <<<<<<<<<<<<<< - * self._filter = filter - * - */ - __Pyx_TraceLine(408,0,__PYX_ERR(0, 408, __pyx_L1_error)) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_vars); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 408, __pyx_L1_error) - __pyx_v_self->vars = __pyx_t_7; + __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":409 - * self.strip = strip - * self.vars = vars - * self._filter = filter # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":402 + * `And` predicate. Exits at the first sub-predicate that returns ``False``. + * """ + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates * - * 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_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_AddTraceback("hunter._predicates.And.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_TraceReturn(Py_None, 0); @@ -12608,342 +12285,299 @@ static int __pyx_pf_6hunter_11_predicates_7Backlog___init__(struct __pyx_obj_6hu return __pyx_r; } -/* "hunter/_predicates.pyx":411 - * self._filter = filter +/* "hunter/_predicates.pyx":405 + * self.predicates = predicates * - * def __call__(self, event): # <<<<<<<<<<<<<< - * return fast_Backlog_call(self, event) + * def __str__(self): # <<<<<<<<<<<<<< + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * */ /* Python wrapper */ -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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +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("__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, 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); + __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 */ -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_2__call__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_event) { +/* "hunter/_predicates.pyx":406 + * + * 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_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 411, 0, __PYX_ERR(0, 411, __pyx_L1_error)); - - /* "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) - * - */ + __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, 406, __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_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, 406, __pyx_L1_error) + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Backlog.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__str__.genexpr", __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":414 - * return fast_Backlog_call(self, event) - * - * 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 - */ - -/* 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; +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); + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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)); + __Pyx_RefNannySetupContext("genexpr", 0); + __Pyx_TraceCall("genexpr", __pyx_f[0], 406, 0, __PYX_ERR(0, 406, __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, 406, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 406, __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, 406, __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, 406, __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, 406, __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, 406, __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, 406, __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; } -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4__str__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { +/* "hunter/_predicates.pyx":405 + * self.predicates = predicates + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * + */ + +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; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 414, 0, __PYX_ERR(0, 414, __pyx_L1_error)); + __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, 405, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __Pyx_TraceCall("__str__", __pyx_f[0], 405, 0, __PYX_ERR(0, 405, __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":415 + /* "hunter/_predicates.pyx":406 * * 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_XDECREF(__pyx_r); - - /* "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 # <<<<<<<<<<<<<< - * ) + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< * + * def __repr__(self): */ - __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_TraceLine(406,0,__PYX_ERR(0, 406, __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, 406, __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(0, 416, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_v_self->condition); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); - __Pyx_INCREF(__pyx_v_self->action); - __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->action); - __Pyx_INCREF(__pyx_v_self->_filter); - __Pyx_GIVEREF(__pyx_v_self->_filter); - PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->_filter); + __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, 406, __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; - __pyx_t_2 = 0; - __pyx_t_3 = 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_3 = __Pyx_PyString_Format(__pyx_kp_s_Backlog_s_size_s_stack_s_vars_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __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":414 - * return fast_Backlog_call(self, event) + /* "hunter/_predicates.pyx":405 + * self.predicates = predicates * * 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 + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("hunter._predicates.Backlog.__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)); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":419 - * ) +/* "hunter/_predicates.pyx":408 + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) * * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % ( - * self.condition, self.size, self.stack, self.vars, self.action, self._filter + * return '' % (self.predicates,) + * */ /* Python wrapper */ -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) { +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_7Backlog_6__repr__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__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_7Backlog_6__repr__(struct __pyx_obj_6hunter_11_predicates_Backlog *__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; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 419, 0, __PYX_ERR(0, 419, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 408, 0, __PYX_ERR(0, 408, __pyx_L1_error)); - /* "hunter/_predicates.pyx":420 + /* "hunter/_predicates.pyx":409 * * def __repr__(self): - * return '' % ( # <<<<<<<<<<<<<< - * self.condition, self.size, self.stack, self.vars, self.action, self._filter - * ) + * return '' % (self.predicates,) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): */ - __Pyx_TraceLine(420,0,__PYX_ERR(0, 420, __pyx_L1_error)) + __Pyx_TraceLine(409,0,__PYX_ERR(0, 409, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __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, 409, __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":421 - * def __repr__(self): - * return '' % ( - * self.condition, self.size, self.stack, self.vars, self.action, self._filter # <<<<<<<<<<<<<< - * ) + /* "hunter/_predicates.pyx":408 + * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' % (self.predicates,) * - */ - __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_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_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_v_self->condition); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); - __Pyx_INCREF(__pyx_v_self->action); - __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->action); - __Pyx_INCREF(__pyx_v_self->_filter); - __Pyx_GIVEREF(__pyx_v_self->_filter); - PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->_filter); - __pyx_t_1 = 0; - __pyx_t_2 = 0; - __pyx_t_3 = 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_3 = __Pyx_PyString_Format(__pyx_kp_s_hunter_predicates_Backlog_condi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __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":419 - * ) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * 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_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("hunter._predicates.Backlog.__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); @@ -12952,28 +12586,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6__repr__(struct __pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":424 - * ) +/* "hunter/_predicates.pyx":411 + * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Backlog) and + * isinstance(other, And) */ /* Python wrapper */ -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) { +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_7Backlog_8__eq__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__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_7Backlog_8__eq__(struct __pyx_obj_6hunter_11_predicates_Backlog *__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 @@ -12984,118 +12618,45 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 424, 0, __PYX_ERR(0, 424, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 411, 0, __PYX_ERR(0, 411, __pyx_L1_error)); - /* "hunter/_predicates.pyx":425 + /* "hunter/_predicates.pyx":412 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< - * isinstance(other, Backlog) and - * self.condition == ( other).condition and + * isinstance(other, And) + * and self.predicates == ( other).predicates */ - __Pyx_TraceLine(425,0,__PYX_ERR(0, 425, __pyx_L1_error)) + __Pyx_TraceLine(412,0,__PYX_ERR(0, 412, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":426 + /* "hunter/_predicates.pyx":413 * def __eq__(self, other): * return ( - * isinstance(other, Backlog) and # <<<<<<<<<<<<<< - * self.condition == ( other).condition and - * self.size == ( other).size 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, 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":427 - * return ( - * 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 + * isinstance(other, And) # <<<<<<<<<<<<<< + * and self.predicates == ( other).predicates * ) */ - __Pyx_TraceLine(430,0,__PYX_ERR(0, 430, __pyx_L1_error)) - __pyx_t_2 = (__pyx_v_self->vars == ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->vars); + __Pyx_TraceLine(413,0,__PYX_ERR(0, 413, __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, 430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 413, __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":431 - * self.stack == ( other).stack and - * self.vars == ( other).vars and - * self.action == ( other).action # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":414 + * return ( + * isinstance(other, And) + * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< * ) * */ - __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_TraceLine(414,0,__PYX_ERR(0, 414, __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, 414, __pyx_L1_error) __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13104,19 +12665,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":424 - * ) + /* "hunter/_predicates.pyx":411 + * return '' % (self.predicates,) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Backlog) and + * isinstance(other, And) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.Backlog.__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); @@ -13125,99 +12686,72 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_8__eq__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pyx":434 +/* "hunter/_predicates.pyx":417 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) + * return hash(('And', self.predicates)) * */ /* Python wrapper */ -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) { +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_7Backlog_10__hash__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__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_7Backlog_10__hash__(struct __pyx_obj_6hunter_11_predicates_Backlog *__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; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_hash_t __pyx_t_5; + Py_hash_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 434, 0, __PYX_ERR(0, 434, __pyx_L1_error)); + __Pyx_TraceCall("__hash__", __pyx_f[0], 417, 0, __PYX_ERR(0, 417, __pyx_L1_error)); - /* "hunter/_predicates.pyx":435 + /* "hunter/_predicates.pyx":418 * * def __hash__(self): - * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) # <<<<<<<<<<<<<< + * return hash(('And', self.predicates)) # <<<<<<<<<<<<<< * - * def __or__(self, other): + * def __call__(self, Event event): */ - __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_TraceLine(418,0,__PYX_ERR(0, 418, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __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(0, 435, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_n_s_Backlog); - __Pyx_GIVEREF(__pyx_n_s_Backlog); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Backlog); - __Pyx_INCREF(__pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_v_self->condition); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_3); - __Pyx_INCREF(__pyx_v_self->action); - __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->action); - __Pyx_INCREF(__pyx_v_self->_filter); - __Pyx_GIVEREF(__pyx_v_self->_filter); - PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->_filter); - __pyx_t_1 = 0; - __pyx_t_2 = 0; - __pyx_t_3 = 0; - __pyx_t_5 = PyObject_Hash(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 435, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; + __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, 418, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "hunter/_predicates.pyx":434 + /* "hunter/_predicates.pyx":417 * ) * * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) + * return hash(('And', self.predicates)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("hunter._predicates.Backlog.__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; @@ -13226,250 +12760,110 @@ static Py_hash_t __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(struct __pyx return __pyx_r; } -/* "hunter/_predicates.pyx":437 - * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) +/* "hunter/_predicates.pyx":420 + * return hash(('And', self.predicates)) * - * def __or__(self, other): # <<<<<<<<<<<<<< - * return Or(self, other) + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_And_call(self, event) * */ /* Python wrapper */ -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("__or__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_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_7Backlog_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; +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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 437, 0, __PYX_ERR(0, 437, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":438 - * - * def __or__(self, other): - * return Or(self, other) # <<<<<<<<<<<<<< - * - * def __and__(self, other): - */ - __Pyx_TraceLine(438,0,__PYX_ERR(0, 438, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __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, 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":437 - * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) - * - * 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.Backlog.__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":440 - * return Or(self, other) - * - * def __and__(self, other): # <<<<<<<<<<<<<< - * return And(self, other) - * - */ - -/* Python wrapper */ -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("__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_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, 420, __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, 420, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("hunter._predicates.And.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 440, 0, __PYX_ERR(0, 440, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":441 - * - * def __and__(self, other): - * return And(self, other) # <<<<<<<<<<<<<< - * - * def __invert__(self): - */ - __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, 441, __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, 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":440 - * return Or(self, other) - * - * def __and__(self, other): # <<<<<<<<<<<<<< - * return And(self, other) - * - */ + 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, 420, __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; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.Backlog.__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":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) - * - */ - -/* Python wrapper */ -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("__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_7Backlog_16__invert__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { +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; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 443, 0, __PYX_ERR(0, 443, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__call__", 0); + __Pyx_TraceCall("__call__", __pyx_f[0], 420, 0, __PYX_ERR(0, 420, __pyx_L1_error)); - /* "hunter/_predicates.pyx":444 + /* "hunter/_predicates.pyx":421 * - * def __invert__(self): - * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) # <<<<<<<<<<<<<< + * def __call__(self, Event event): + * return fast_And_call(self, event) # <<<<<<<<<<<<<< * - * def __ror__(self, other): + * def __or__(self, other): */ - __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __pyx_L1_error)) + __Pyx_TraceLine(421,0,__PYX_ERR(0, 421, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __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_t_1 = __pyx_f_6hunter_11_predicates_fast_And_call(__pyx_v_self, __pyx_v_event); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __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_r = __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); - 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_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; - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); 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_vars, __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_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":443 - * return And(self, other) + /* "hunter/_predicates.pyx":420 + * return hash(('And', self.predicates)) * - * def __invert__(self): # <<<<<<<<<<<<<< - * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_And_call(self, event) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.Backlog.__invert__", __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); @@ -13478,28 +12872,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_16__invert__(struct __p return __pyx_r; } -/* "hunter/_predicates.pyx":446 - * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) +/* "hunter/_predicates.pyx":423 + * return fast_And_call(self, event) * - * def __ror__(self, other): # <<<<<<<<<<<<<< - * return Or(other, self) + * def __or__(self, other): # <<<<<<<<<<<<<< + * return Or(self, other) * */ /* Python wrapper */ -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) { +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("__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)); + __Pyx_RefNannySetupContext("__or__ (wrapper)", 0); + __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_7Backlog_18__ror__(struct __pyx_obj_6hunter_11_predicates_Backlog *__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 @@ -13508,38 +12902,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(struct __pyx_ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__ror__", 0); - __Pyx_TraceCall("__ror__", __pyx_f[0], 446, 0, __PYX_ERR(0, 446, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__or__", 0); + __Pyx_TraceCall("__or__", __pyx_f[0], 423, 0, __PYX_ERR(0, 423, __pyx_L1_error)); - /* "hunter/_predicates.pyx":447 + /* "hunter/_predicates.pyx":424 * - * def __ror__(self, other): - * return Or(other, self) # <<<<<<<<<<<<<< + * def __or__(self, other): + * return Or(self, other) # <<<<<<<<<<<<<< * - * def __rand__(self, other): + * def __and__(self, other): */ - __Pyx_TraceLine(447,0,__PYX_ERR(0, 447, __pyx_L1_error)) + __Pyx_TraceLine(424,0,__PYX_ERR(0, 424, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __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, 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) + 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, 424, __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":446 - * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) + /* "hunter/_predicates.pyx":423 + * return fast_And_call(self, event) * - * def __ror__(self, other): # <<<<<<<<<<<<<< - * return Or(other, self) + * def __or__(self, other): # <<<<<<<<<<<<<< + * return Or(self, other) * */ @@ -13547,7 +12941,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(struct __pyx_ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.Backlog.__ror__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.And.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -13556,326 +12950,274 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_18__ror__(struct __pyx_ return __pyx_r; } -/* "hunter/_predicates.pyx":449 - * return Or(other, self) - * - * def __rand__(self, other): # <<<<<<<<<<<<<< - * return And(other, self) +/* "hunter/_predicates.pyx":426 + * 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_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) { +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("__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)); + __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_7Backlog_20__rand__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self, PyObject *__pyx_v_other) { +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 __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__rand__", 0); - __Pyx_TraceCall("__rand__", __pyx_f[0], 449, 0, __PYX_ERR(0, 449, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__and__", 0); + __Pyx_TraceCall("__and__", __pyx_f[0], 426, 0, __PYX_ERR(0, 426, __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_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":428 + * def __and__(self, other): + * cdef list predicates + * if type(self) is And: # <<<<<<<<<<<<<< + * predicates = list((self).predicates) + * else: + */ + __Pyx_TraceLine(428,0,__PYX_ERR(0, 428, __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":449 - * return Or(other, self) + /* "hunter/_predicates.pyx":429 + * cdef list predicates + * if type(self) is And: + * predicates = list((self).predicates) # <<<<<<<<<<<<<< + * else: + * predicates = [self] + */ + __Pyx_TraceLine(429,0,__PYX_ERR(0, 429, __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, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_predicates = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "hunter/_predicates.pyx":428 + * def __and__(self, other): + * cdef list predicates + * if type(self) is And: # <<<<<<<<<<<<<< + * predicates = list((self).predicates) + * else: + */ + goto __pyx_L3; + } + + /* "hunter/_predicates.pyx":431 + * predicates = list((self).predicates) + * else: + * predicates = [self] # <<<<<<<<<<<<<< + * if isinstance(other, And): + * predicates.extend(( other).predicates) + */ + __Pyx_TraceLine(431,0,__PYX_ERR(0, 431, __pyx_L1_error)) + /*else*/ { + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __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":432 + * else: + * predicates = [self] + * if isinstance(other, And): # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) + * else: + */ + __Pyx_TraceLine(432,0,__PYX_ERR(0, 432, __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":433 + * predicates = [self] + * if isinstance(other, And): + * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< + * else: + * predicates.append(other) + */ + __Pyx_TraceLine(433,0,__PYX_ERR(0, 433, __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, 433, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "hunter/_predicates.pyx":432 + * else: + * predicates = [self] + * if isinstance(other, And): # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) + * else: + */ + goto __pyx_L4; + } + + /* "hunter/_predicates.pyx":435 + * predicates.extend(( other).predicates) + * else: + * predicates.append(other) # <<<<<<<<<<<<<< + * return And(*predicates) * - * def __rand__(self, other): # <<<<<<<<<<<<<< - * return And(other, self) + */ + __Pyx_TraceLine(435,0,__PYX_ERR(0, 435, __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, 435, __pyx_L1_error) + } + __pyx_L4:; + + /* "hunter/_predicates.pyx":436 + * else: + * predicates.append(other) + * return And(*predicates) # <<<<<<<<<<<<<< + * + * def __invert__(self): + */ + __Pyx_TraceLine(436,0,__PYX_ERR(0, 436, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __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, 436, __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":426 + * return Or(self, other) * + * 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_AddTraceback("hunter._predicates.Backlog.__rand__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.And.__and__", __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":452 - * return And(other, self) +/* "hunter/_predicates.pyx":438 + * return And(*predicates) * - * def filter(self, *args, **kwargs): # <<<<<<<<<<<<<< - * from hunter import _merge + * def __invert__(self): # <<<<<<<<<<<<<< + * return Not(self) * */ /* Python wrapper */ -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; +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("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); + __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)); /* 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_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; +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; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("filter", 0); - __Pyx_TraceCall("filter", __pyx_f[0], 452, 0, __PYX_ERR(0, 452, __pyx_L1_error)); - __Pyx_INCREF(__pyx_v_args); + __Pyx_RefNannySetupContext("__invert__", 0); + __Pyx_TraceCall("__invert__", __pyx_f[0], 438, 0, __PYX_ERR(0, 438, __pyx_L1_error)); - /* "hunter/_predicates.pyx":453 + /* "hunter/_predicates.pyx":439 * - * def filter(self, *args, **kwargs): - * from hunter import _merge # <<<<<<<<<<<<<< + * def __invert__(self): + * return Not(self) # <<<<<<<<<<<<<< * - * if self.filter is not None: + * cdef inline fast_And_call(And self, Event event): */ - __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_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_TraceLine(439,0,__PYX_ERR(0, 439, __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, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __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; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "hunter/_predicates.pyx":455 - * from hunter import _merge + /* "hunter/_predicates.pyx":438 + * return And(*predicates) * - * if self.filter is not None: # <<<<<<<<<<<<<< - * args = (self.filter,) + args + * def __invert__(self): # <<<<<<<<<<<<<< + * return Not(self) * */ - __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) { - /* "hunter/_predicates.pyx":456 - * - * if self.filter is not None: - * args = (self.filter,) + args # <<<<<<<<<<<<<< - * - * return Backlog( - */ - __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; + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.And.__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.pyx":455 - * from hunter import _merge - * - * if self.filter is not None: # <<<<<<<<<<<<<< - * args = (self.filter,) + args +/* "hunter/_predicates.pxd":24 + * cdef class And: + * cdef: + * readonly tuple predicates # <<<<<<<<<<<<<< * + * @cython.final */ - } - /* "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; - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); 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_vars, __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_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; -} - -/* "hunter/_predicates.pxd":54 - * cdef class Backlog: - * cdef: - * readonly object condition # <<<<<<<<<<<<<< - * readonly int size - * readonly int stack - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9condition_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9condition_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_9condition___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); +/* 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) { + 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)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_9condition___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__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 @@ -13883,15 +13225,15 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_9condition___get__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 54, 0, __PYX_ERR(1, 54, __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->condition); - __pyx_r = __pyx_v_self->condition; + __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.Backlog.condition.__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); @@ -13900,178 +13242,273 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_9condition___get__(stru return __pyx_r; } -/* "hunter/_predicates.pxd":55 - * cdef: - * readonly object condition - * readonly int size # <<<<<<<<<<<<<< - * readonly int stack - * readonly bint vars +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(PyObject *__pyx_v_self) { +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("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + __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)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__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; 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) + __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.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_r = __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; - goto __pyx_L0; - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Backlog.size.__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; -} -/* "hunter/_predicates.pxd":56 - * readonly object condition - * readonly int size - * readonly int stack # <<<<<<<<<<<<<< - * readonly bint vars - * readonly bint strip + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.predicates,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) */ - -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(((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_5stack___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 56, 0, __PYX_ERR(1, 56, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __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_r = __pyx_t_1; + __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - goto __pyx_L0; - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Backlog.stack.__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)":7 + * state = (self.predicates,) + * _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) { -/* "hunter/_predicates.pxd":57 - * readonly int size - * readonly int stack - * readonly bint vars # <<<<<<<<<<<<<< - * readonly bint strip - * readonly object action + /* "(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; -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4vars_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4vars_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.predicates is not None + */ + __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) + __pyx_v_use_setstate = 1; - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "(tree fragment)":7 + * state = (self.predicates,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True + */ + goto __pyx_L3; + } -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 57, 0, __PYX_ERR(1, 57, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, 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_L3:; + + /* "(tree fragment)":12 + * else: + * use_setstate = self.predicates is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, 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.predicates is not None + * if use_setstate: + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< + * else: + * 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_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_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); + __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.predicates is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + * else: + */ + } + + /* "(tree fragment)":15 + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + * else: + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(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_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); + __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); + __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_AddTraceback("hunter._predicates.Backlog.vars.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("hunter._predicates.And.__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; } -/* "hunter/_predicates.pxd":58 - * readonly int stack - * readonly bint vars - * readonly bint strip # <<<<<<<<<<<<<< - * readonly object action - * readonly object _filter +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_And__set_state(self, __pyx_state) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5strip_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5strip_1__get__(PyObject *__pyx_v_self) { +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("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + __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)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { +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 @@ -14079,19 +13516,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct _ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 58, 0, __PYX_ERR(1, 58, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) + __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_And, (type(self), 0xaa8cbda, state) + * def __setstate_cython__(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_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_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_And__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.Backlog.strip.__get__", __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); @@ -14100,503 +13551,799 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct _ return __pyx_r; } -/* "hunter/_predicates.pxd":59 - * readonly bint vars - * readonly bint strip - * readonly object action # <<<<<<<<<<<<<< - * readonly object _filter - * readonly object queue +/* "hunter/_predicates.pyx":441 + * return Not(self) + * + * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< + * for predicate in self.predicates: + * if not fast_call(predicate, event): */ -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_6action_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_6action_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(((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_6action___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { +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 __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->action); - __pyx_r = __pyx_v_self->action; - goto __pyx_L0; - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Backlog.action.__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; -} + __Pyx_RefNannySetupContext("fast_And_call", 0); + __Pyx_TraceCall("fast_And_call", __pyx_f[0], 441, 0, __PYX_ERR(0, 441, __pyx_L1_error)); -/* "hunter/_predicates.pxd":60 - * readonly bint strip - * readonly object action - * readonly object _filter # <<<<<<<<<<<<<< - * readonly object queue + /* "hunter/_predicates.pyx":442 * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + * cdef inline fast_And_call(And self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if not fast_call(predicate, event): + * return False + */ + __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error)) + if (unlikely(__pyx_v_self->predicates == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 442, __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, 442, __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, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_XDECREF_SET(__pyx_v_predicate, __pyx_t_3); + __pyx_t_3 = 0; - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "hunter/_predicates.pyx":443 + * 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(443,0,__PYX_ERR(0, 443, __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, 443, __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, 443, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_5 = ((!__pyx_t_4) != 0); + if (__pyx_t_5) { -static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 60, 0, __PYX_ERR(1, 60, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->_filter); - __pyx_r = __pyx_v_self->_filter; - goto __pyx_L0; + /* "hunter/_predicates.pyx":444 + * for predicate in self.predicates: + * if not fast_call(predicate, event): + * return False # <<<<<<<<<<<<<< + * else: + * return True + */ + __Pyx_TraceLine(444,0,__PYX_ERR(0, 444, __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":443 + * 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":442 + * + * cdef inline fast_And_call(And self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if not fast_call(predicate, event): + * return False + */ + __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error)) + } + /*else*/ { + + /* "hunter/_predicates.pyx":446 + * return False + * else: + * return True # <<<<<<<<<<<<<< + * + * + */ + __Pyx_TraceLine(446,0,__PYX_ERR(0, 446, __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":442 + * + * cdef inline fast_And_call(And self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if not fast_call(predicate, event): + * return False + */ + __Pyx_TraceLine(442,0,__PYX_ERR(0, 442, __pyx_L1_error)) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "hunter/_predicates.pyx":441 + * return Not(self) + * + * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< + * for predicate in self.predicates: + * if not fast_call(predicate, event): + */ /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Backlog._filter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __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.pxd":61 - * readonly object action - * readonly object _filter - * readonly object queue # <<<<<<<<<<<<<< +/* "hunter/_predicates.pyx":455 + * """ + * + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates * - * cdef fast_And_call(And self, Event event) */ /* Python wrapper */ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 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("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); + __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 PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { - PyObject *__pyx_r = NULL; +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 int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 61, 0, __PYX_ERR(1, 61, __pyx_L1_error)); - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->queue); - __pyx_r = __pyx_v_self->queue; - goto __pyx_L0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_TraceCall("__init__", __pyx_f[0], 455, 0, __PYX_ERR(0, 455, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":456 + * + * def __init__(self, *predicates): + * self.predicates = predicates # <<<<<<<<<<<<<< + * + * def __str__(self): + */ + __Pyx_TraceLine(456,0,__PYX_ERR(0, 456, __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":455 + * """ + * + * def __init__(self, *predicates): # <<<<<<<<<<<<<< + * self.predicates = predicates + * + */ /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Backlog.queue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __Pyx_AddTraceback("hunter._predicates.Or.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict +/* "hunter/_predicates.pyx":458 + * self.predicates = predicates + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * */ /* 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) { +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("__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)); + __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_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_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; +/* "hunter/_predicates.pyx":459 + * + * 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_TraceDeclarations __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("genexpr", 0); + __pyx_cur_scope = (struct __pyx_obj_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, 459, __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, 459, __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; - PyObject *__pyx_t_2 = NULL; + Py_ssize_t __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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __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_RefNannyDeclarations + __Pyx_RefNannySetupContext("genexpr", 0); + __Pyx_TraceCall("genexpr", __pyx_f[0], 459, 0, __PYX_ERR(0, 459, __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, 459, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 459, __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, 459, __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, 459, __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, 459, __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, 459, __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, 459, __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":458 + * self.predicates = predicates + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * */ - __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) + +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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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); + 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, 458, __pyx_L1_error) + } else { + __Pyx_GOTREF(__pyx_cur_scope); + } + __Pyx_TraceCall("__str__", __pyx_f[0], 458, 0, __PYX_ERR(0, 458, __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":459 + * + * def __str__(self): + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< + * + * def __repr__(self): + */ + __Pyx_TraceLine(459,0,__PYX_ERR(0, 459, __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, 459, __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_t_2 = __Pyx_PyString_Join(__pyx_kp_s__3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_self->_filter); - __Pyx_GIVEREF(__pyx_v_self->_filter); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->_filter); - __Pyx_INCREF(__pyx_v_self->action); - __Pyx_GIVEREF(__pyx_v_self->action); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->action); - __Pyx_INCREF(__pyx_v_self->condition); - __Pyx_GIVEREF(__pyx_v_self->condition); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->condition); - __Pyx_INCREF(__pyx_v_self->queue); - __Pyx_GIVEREF(__pyx_v_self->queue); - PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_self->queue); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_4); + __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, 459, __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; - __pyx_t_2 = 0; - __pyx_t_3 = 0; - __pyx_t_4 = 0; - __pyx_v_state = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + goto __pyx_L0; - /* "(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,) + /* "hunter/_predicates.pyx":458 + * self.predicates = predicates + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * */ - __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) - __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v__dict = __pyx_t_5; - __pyx_t_5 = 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_6 = (__pyx_v__dict != Py_None); - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + /* function exit code */ + __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_r = NULL; + __pyx_L0:; + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "(tree fragment)":8 - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: - * state += (_dict,) # <<<<<<<<<<<<<< - * use_setstate = True - * else: +/* "hunter/_predicates.pyx":461 + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' % (self.predicates,) + * */ - __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 8, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v__dict); - __Pyx_GIVEREF(__pyx_v__dict); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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._filter is not None or self.action is not None or self.condition is not None or self.queue is not None - */ - __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) - __pyx_v_use_setstate = 1; +/* 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) { + 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)); - /* "(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 - */ - goto __pyx_L3; - } + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "(tree fragment)":11 - * use_setstate = True - * else: - * 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 # <<<<<<<<<<<<<< - * if use_setstate: - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state +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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + __Pyx_TraceCall("__repr__", __pyx_f[0], 461, 0, __PYX_ERR(0, 461, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":462 + * + * def __repr__(self): + * return '' % (self.predicates,) # <<<<<<<<<<<<<< + * + * def __eq__(self, other): */ - __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) - /*else*/ { - __pyx_t_6 = (__pyx_v_self->_filter != Py_None); - __pyx_t_8 = (__pyx_t_6 != 0); - if (!__pyx_t_8) { - } else { - __pyx_t_7 = __pyx_t_8; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_8 = (__pyx_v_self->action != Py_None); - __pyx_t_6 = (__pyx_t_8 != 0); - if (!__pyx_t_6) { - } else { - __pyx_t_7 = __pyx_t_6; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_6 = (__pyx_v_self->condition != Py_None); - __pyx_t_8 = (__pyx_t_6 != 0); - if (!__pyx_t_8) { - } else { - __pyx_t_7 = __pyx_t_8; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_8 = (__pyx_v_self->queue != Py_None); - __pyx_t_6 = (__pyx_t_8 != 0); - __pyx_t_7 = __pyx_t_6; - __pyx_L4_bool_binop_done:; - __pyx_v_use_setstate = __pyx_t_7; - } - __pyx_L3:; + __Pyx_TraceLine(462,0,__PYX_ERR(0, 462, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __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, 462, __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; - /* "(tree fragment)":12 - * else: - * 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 - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state - * else: + /* "hunter/_predicates.pyx":461 + * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' % (self.predicates,) + * */ - __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_7 = (__pyx_v_use_setstate != 0); - if (__pyx_t_7) { - /* "(tree fragment)":13 - * 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 - * if use_setstate: - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state # <<<<<<<<<<<<<< - * else: - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) + /* function exit code */ + __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_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":464 + * return '' % (self.predicates,) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Or) */ - __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_Backlog); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_61357180); - __Pyx_GIVEREF(__pyx_int_61357180); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_61357180); - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); - __Pyx_INCREF(__pyx_v_state); - __Pyx_GIVEREF(__pyx_v_state); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); - __pyx_t_4 = 0; - __pyx_t_5 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - /* "(tree fragment)":12 - * else: - * 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 - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state - * else: +/* 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) { + 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)); + + /* 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) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__eq__", 0); + __Pyx_TraceCall("__eq__", __pyx_f[0], 464, 0, __PYX_ERR(0, 464, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":465 + * + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * isinstance(other, Or) + * and self.predicates == ( other).predicates */ - } + __Pyx_TraceLine(465,0,__PYX_ERR(0, 465, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); - /* "(tree fragment)":15 - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state - * else: - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Backlog__set_state(self, __pyx_state) + /* "hunter/_predicates.pyx":466 + * def __eq__(self, other): + * return ( + * isinstance(other, Or) # <<<<<<<<<<<<<< + * and self.predicates == ( other).predicates + * ) */ - __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_TraceLine(466,0,__PYX_ERR(0, 466, __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, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); - __Pyx_INCREF(__pyx_int_61357180); - __Pyx_GIVEREF(__pyx_int_61357180); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_61357180); - __Pyx_INCREF(__pyx_v_state); - __Pyx_GIVEREF(__pyx_v_state); - PyTuple_SET_ITEM(__pyx_t_5, 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_3); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; - __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; + goto __pyx_L3_bool_binop_done; } - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict + /* "hunter/_predicates.pyx":467 + * return ( + * isinstance(other, Or) + * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(467,0,__PYX_ERR(0, 467, __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, 467, __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":464 + * return '' % (self.predicates,) + * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Or) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Backlog.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Or.__eq__", __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_Backlog, (type(self), 0x3a83c7c, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Backlog__set_state(self, __pyx_state) +/* "hunter/_predicates.pyx":470 + * ) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Or', self.predicates)) + * */ /* Python wrapper */ -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; +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("__setstate_cython__ (wrapper)", 0); - __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)); + __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)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -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; +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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__hash__", 0); + __Pyx_TraceCall("__hash__", __pyx_f[0], 470, 0, __PYX_ERR(0, 470, __pyx_L1_error)); - /* "(tree fragment)":17 - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) - * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Backlog__set_state(self, __pyx_state) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":471 + * + * def __hash__(self): + * return hash(('Or', self.predicates)) # <<<<<<<<<<<<<< + * + * def __call__(self, Event event): */ - __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_Backlog__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) + __Pyx_TraceLine(471,0,__PYX_ERR(0, 471, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __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_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, 471, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; - /* "(tree fragment)":16 - * else: - * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Backlog__set_state(self, __pyx_state) + /* "hunter/_predicates.pyx":470 + * ) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Or', 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_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":473 + * return hash(('Or', self.predicates)) + * + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_Or_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) { + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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, 473, __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, 473, __pyx_L3_error) + __pyx_L3_error:; + __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, 473, __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; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + 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) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__call__", 0); + __Pyx_TraceCall("__call__", __pyx_f[0], 473, 0, __PYX_ERR(0, 473, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":474 + * + * def __call__(self, Event event): + * return fast_Or_call(self, event) # <<<<<<<<<<<<<< + * + * def __or__(self, other): + */ + __Pyx_TraceLine(474,0,__PYX_ERR(0, 474, __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, 474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":473 + * return hash(('Or', self.predicates)) + * + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_Or_call(self, event) + * */ /* 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.Backlog.__setstate_cython__", __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); @@ -14605,1431 +14352,1484 @@ static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_26__setstate_cython__(s return __pyx_r; } -/* "hunter/_predicates.pyx":464 - * ) +/* "hunter/_predicates.pyx":476 + * return fast_Or_call(self, event) * - * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< - * cdef bint first_is_call - * cdef Event detached_event + * def __or__(self, other): # <<<<<<<<<<<<<< + * cdef list predicates + * if type(self) is Or: */ -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) { - int __pyx_v_first_is_call; - struct __pyx_obj_6hunter_6_event_Event *__pyx_v_detached_event = 0; - struct __pyx_obj_6hunter_6_event_Event *__pyx_v_first_event = 0; - struct __pyx_obj_6hunter_6_event_Event *__pyx_v_stack_event = 0; - PyFrameObject *__pyx_v_first_frame = 0; - PyFrameObject *__pyx_v_frame = 0; - int __pyx_v_backlog_call_depth; - int __pyx_v_depth_delta; - int __pyx_v_first_depth; - int __pyx_v_missing_depth; - PyObject *__pyx_v_result = 0; - PyObject *__pyx_v_stack_events = 0; - PyObject *__pyx_v_backlog_event = NULL; +/* 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) { + 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)); + + /* 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) { + PyObject *__pyx_v_predicates = 0; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - long __pyx_t_6; - long __pyx_t_7; - int __pyx_t_8; - Py_ssize_t __pyx_t_9; - PyObject *(*__pyx_t_10)(PyObject *); - int __pyx_t_11; - PyObject *__pyx_t_12 = NULL; - struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_13; - int __pyx_t_14; + int __pyx_t_1; + int __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fast_Backlog_call", 0); - __Pyx_TraceCall("fast_Backlog_call", __pyx_f[0], 464, 0, __PYX_ERR(0, 464, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__or__", 0); + __Pyx_TraceCall("__or__", __pyx_f[0], 476, 0, __PYX_ERR(0, 476, __pyx_L1_error)); /* "hunter/_predicates.pyx":478 - * cdef object stack_events - * - * result = fast_call(self.condition, event) # <<<<<<<<<<<<<< - * if result: - * if self.queue: + * def __or__(self, other): + * cdef list predicates + * if type(self) is Or: # <<<<<<<<<<<<<< + * predicates = list(( self).predicates) + * else: */ __Pyx_TraceLine(478,0,__PYX_ERR(0, 478, __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, 478, __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; + __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":479 - * - * result = fast_call(self.condition, event) - * if result: # <<<<<<<<<<<<<< - * if self.queue: - * self.action.cleanup() + /* "hunter/_predicates.pyx":479 + * cdef list predicates + * if type(self) is Or: + * predicates = list(( self).predicates) # <<<<<<<<<<<<<< + * else: + * predicates = [self] */ - __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 479, __pyx_L1_error) - if (__pyx_t_3) { + __Pyx_TraceLine(479,0,__PYX_ERR(0, 479, __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, 479, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_predicates = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; - /* "hunter/_predicates.pyx":480 - * result = fast_call(self.condition, event) - * if result: - * if self.queue: # <<<<<<<<<<<<<< - * self.action.cleanup() - * + /* "hunter/_predicates.pyx":478 + * def __or__(self, other): + * cdef list predicates + * if type(self) is Or: # <<<<<<<<<<<<<< + * predicates = list(( self).predicates) + * else: */ - __Pyx_TraceLine(480,0,__PYX_ERR(0, 480, __pyx_L1_error)) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->queue); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 480, __pyx_L1_error) - if (__pyx_t_3) { + goto __pyx_L3; + } - /* "hunter/_predicates.pyx":481 - * if result: - * if self.queue: - * self.action.cleanup() # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":481 + * predicates = list(( self).predicates) + * else: + * predicates = [self] # <<<<<<<<<<<<<< + * if type(other) is Or: + * predicates.extend(( other).predicates) + */ + __Pyx_TraceLine(481,0,__PYX_ERR(0, 481, __pyx_L1_error)) + /*else*/ { + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 481, __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":482 + * else: + * predicates = [self] + * if type(other) is Or: # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) + * else: + */ + __Pyx_TraceLine(482,0,__PYX_ERR(0, 482, __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":483 + * predicates = [self] + * if type(other) is Or: + * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< + * else: + * predicates.append(other) + */ + __Pyx_TraceLine(483,0,__PYX_ERR(0, 483, __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, 483, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "hunter/_predicates.pyx":482 + * else: + * predicates = [self] + * if type(other) is Or: # <<<<<<<<<<<<<< + * predicates.extend(( other).predicates) + * else: + */ + goto __pyx_L4; + } + + /* "hunter/_predicates.pyx":485 + * predicates.extend(( other).predicates) + * else: + * predicates.append(other) # <<<<<<<<<<<<<< + * return Or(*predicates) * - * first_event = self.queue[0] */ - __Pyx_TraceLine(481,0,__PYX_ERR(0, 481, __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, 481, __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, 481, __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; + __Pyx_TraceLine(485,0,__PYX_ERR(0, 485, __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, 485, __pyx_L1_error) + } + __pyx_L4:; - /* "hunter/_predicates.pyx":483 - * self.action.cleanup() + /* "hunter/_predicates.pyx":486 + * else: + * predicates.append(other) + * return Or(*predicates) # <<<<<<<<<<<<<< * - * first_event = self.queue[0] # <<<<<<<<<<<<<< - * first_depth = first_event.depth - * backlog_call_depth = event.depth - first_depth + * def __and__(self, other): */ - __Pyx_TraceLine(483,0,__PYX_ERR(0, 483, __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, 483, __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, 483, __pyx_L1_error) - __pyx_v_first_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); - __pyx_t_2 = 0; + __Pyx_TraceLine(486,0,__PYX_ERR(0, 486, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __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, 486, __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":484 + /* "hunter/_predicates.pyx":476 + * return fast_Or_call(self, event) * - * first_event = self.queue[0] - * first_depth = first_event.depth # <<<<<<<<<<<<<< - * backlog_call_depth = event.depth - first_depth - * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid + * def __or__(self, other): # <<<<<<<<<<<<<< + * cdef list predicates + * if type(self) is Or: */ - __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_event = self.queue[0] - * first_depth = first_event.depth - * backlog_call_depth = event.depth - first_depth # <<<<<<<<<<<<<< - * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid - * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + /* 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_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":488 + * return Or(*predicates) + * + * def __and__(self, other): # <<<<<<<<<<<<<< + * return And(self, other) + * */ - __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 - * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid # <<<<<<<<<<<<<< - * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) - * if missing_depth: +/* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__and__", 0); + __Pyx_TraceCall("__and__", __pyx_f[0], 488, 0, __PYX_ERR(0, 488, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":489 + * + * def __and__(self, other): + * return And(self, other) # <<<<<<<<<<<<<< + * + * def __invert__(self): */ - __Pyx_TraceLine(486,0,__PYX_ERR(0, 486, __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, 486, __pyx_L1_error) - __pyx_v_first_is_call = __pyx_t_3; + __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __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, 489, __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":487 - * backlog_call_depth = event.depth - first_depth - * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid - * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) # <<<<<<<<<<<<<< - * if missing_depth: - * if first_is_call: + /* "hunter/_predicates.pyx":488 + * return Or(*predicates) + * + * def __and__(self, other): # <<<<<<<<<<<<<< + * return And(self, other) + * */ - __Pyx_TraceLine(487,0,__PYX_ERR(0, 487, __pyx_L1_error)) - __pyx_t_5 = ((__pyx_v_self->stack - __pyx_v_backlog_call_depth) + __pyx_v_first_is_call); - __pyx_t_6 = 0; - if (((__pyx_t_5 > __pyx_t_6) != 0)) { - __pyx_t_7 = __pyx_t_5; - } else { - __pyx_t_7 = __pyx_t_6; - } - __pyx_t_6 = __pyx_t_7; - __pyx_t_5 = __pyx_v_first_depth; - if (((__pyx_t_6 < __pyx_t_5) != 0)) { - __pyx_t_7 = __pyx_t_6; - } else { - __pyx_t_7 = __pyx_t_5; - } - __pyx_v_missing_depth = __pyx_t_7; - /* "hunter/_predicates.pyx":488 - * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid - * 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(488,0,__PYX_ERR(0, 488, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_missing_depth != 0); - if (__pyx_t_3) { + /* 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":489 - * 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: +/* "hunter/_predicates.pyx":491 + * return And(self, other) + * + * def __invert__(self): # <<<<<<<<<<<<<< + * return Not(self) + * */ - __Pyx_TraceLine(489,0,__PYX_ERR(0, 489, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_first_is_call != 0); - if (__pyx_t_3) { - /* "hunter/_predicates.pyx":490 - * if missing_depth: - * if first_is_call: - * first_frame = first_event.frame.f_back # <<<<<<<<<<<<<< - * else: - * first_frame = first_event.frame - */ - __Pyx_TraceLine(490,0,__PYX_ERR(0, 490, __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, 490, __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, 490, __pyx_L1_error) - __pyx_v_first_frame = ((PyFrameObject *)__pyx_t_2); - __pyx_t_2 = 0; +/* 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) { + 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)); - /* "hunter/_predicates.pyx":489 - * 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: - */ - goto __pyx_L6; - } + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "hunter/_predicates.pyx":492 - * first_frame = first_event.frame.f_back - * else: - * first_frame = first_event.frame # <<<<<<<<<<<<<< - * if first_frame is not None: - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full - */ - __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __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:; +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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__invert__", 0); + __Pyx_TraceCall("__invert__", __pyx_f[0], 491, 0, __PYX_ERR(0, 491, __pyx_L1_error)); - /* "hunter/_predicates.pyx":493 - * else: - * first_frame = first_event.frame - * if first_frame is not None: # <<<<<<<<<<<<<< - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full - * frame = first_frame + /* "hunter/_predicates.pyx":492 + * + * def __invert__(self): + * return Not(self) # <<<<<<<<<<<<<< + * + * cdef inline fast_Or_call(Or self, Event event): */ - __Pyx_TraceLine(493,0,__PYX_ERR(0, 493, __pyx_L1_error)) - __pyx_t_3 = (((PyObject *)__pyx_v_first_frame) != Py_None); - __pyx_t_8 = (__pyx_t_3 != 0); - if (__pyx_t_8) { + __Pyx_TraceLine(492,0,__PYX_ERR(0, 492, __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, 492, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "hunter/_predicates.pyx":494 - * first_frame = first_event.frame - * if first_frame is not None: - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full # <<<<<<<<<<<<<< - * frame = first_frame - * depth_delta = 0 + /* "hunter/_predicates.pyx":491 + * return And(self, other) + * + * def __invert__(self): # <<<<<<<<<<<<<< + * return Not(self) + * */ - __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __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, 494, __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":495 - * if first_frame is not None: - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full - * frame = first_frame # <<<<<<<<<<<<<< - * depth_delta = 0 - * while frame and depth_delta < missing_depth: - */ - __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) - __Pyx_INCREF(((PyObject *)__pyx_v_first_frame)); - __pyx_v_frame = __pyx_v_first_frame; + /* function exit code */ + __pyx_L1_error:; + __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); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "hunter/_predicates.pyx":496 - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full - * frame = first_frame - * depth_delta = 0 # <<<<<<<<<<<<<< - * while frame and depth_delta < missing_depth: - * stack_event = Event( +/* "hunter/_predicates.pxd":29 + * cdef class Or: + * cdef: + * readonly tuple predicates # <<<<<<<<<<<<<< + * + * @cython.final */ - __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __pyx_L1_error)) - __pyx_v_depth_delta = 0; - /* "hunter/_predicates.pyx":497 - * frame = first_frame - * depth_delta = 0 - * while 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_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 497, __pyx_L1_error) - if (__pyx_t_3) { - } else { - __pyx_t_8 = __pyx_t_3; - goto __pyx_L10_bool_binop_done; - } - __pyx_t_3 = ((__pyx_v_depth_delta < __pyx_v_missing_depth) != 0); - __pyx_t_8 = __pyx_t_3; - __pyx_L10_bool_binop_done:; - if (!__pyx_t_8) break; +/* 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) { + 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)); - /* "hunter/_predicates.pyx":499 - * while 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) + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "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; +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 + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 29, 0, __PYX_ERR(1, 29, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->predicates); + __pyx_r = __pyx_v_self->predicates; + goto __pyx_L0; - /* "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) + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("hunter._predicates.Or.predicates.__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; +} - /* "hunter/_predicates.pyx":498 - * depth_delta = 0 - * while frame and depth_delta < missing_depth: - * stack_event = Event( # <<<<<<<<<<<<<< - * frame=frame, kind='call', arg=None, - * threading_support=event.threading_support, +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ - __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, ((struct __pyx_obj_6hunter_6_event_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._locals = {} +/* 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) { + 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)); + + /* 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) { + 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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.predicates,) # <<<<<<<<<<<<<< + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: */ - __Pyx_TraceLine(503,0,__PYX_ERR(0, 503, __pyx_L1_error)) - __pyx_t_8 = ((!(__pyx_v_self->vars != 0)) != 0); - if (__pyx_t_8) { + __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->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; - /* "hunter/_predicates.pyx":505 - * if not self.vars: - * # noinspection PyPropertyAccess - * stack_event._locals = {} # <<<<<<<<<<<<<< - * stack_event._globals = {} - * stack_event.detached = True + /* "(tree fragment)":6 + * cdef bint use_setstate + * state = (self.predicates,) + * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< + * if _dict is not None: + * state += (_dict,) */ - __Pyx_TraceLine(505,0,__PYX_ERR(0, 505, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_stack_event->_locals); - __Pyx_DECREF(__pyx_v_stack_event->_locals); - __pyx_v_stack_event->_locals = __pyx_t_1; - __pyx_t_1 = 0; + __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; - /* "hunter/_predicates.pyx":506 - * # noinspection PyPropertyAccess - * stack_event._locals = {} - * stack_event._globals = {} # <<<<<<<<<<<<<< - * stack_event.detached = True - * stack_events.appendleft(stack_event) + /* "(tree fragment)":7 + * state = (self.predicates,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True */ - __Pyx_TraceLine(506,0,__PYX_ERR(0, 506, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_stack_event->_globals); - __Pyx_DECREF(__pyx_v_stack_event->_globals); - __pyx_v_stack_event->_globals = __pyx_t_1; - __pyx_t_1 = 0; + __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) { - /* "hunter/_predicates.pyx":507 - * stack_event._locals = {} - * stack_event._globals = {} - * stack_event.detached = True # <<<<<<<<<<<<<< - * stack_events.appendleft(stack_event) - * frame = frame.f_back + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: */ - __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __pyx_L1_error)) - __pyx_v_stack_event->detached = 1; + __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; - /* "hunter/_predicates.pyx":503 - * depth=first_depth - depth_delta - 1, calls=-1 - * ) - * if not self.vars: # <<<<<<<<<<<<<< - * # noinspection PyPropertyAccess - * stack_event._locals = {} + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.predicates is not None */ - } + __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) + __pyx_v_use_setstate = 1; - /* "hunter/_predicates.pyx":508 - * stack_event._globals = {} - * stack_event.detached = True - * stack_events.appendleft(stack_event) # <<<<<<<<<<<<<< - * frame = frame.f_back - * depth_delta += 1 + /* "(tree fragment)":7 + * state = (self.predicates,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True */ - __Pyx_TraceLine(508,0,__PYX_ERR(0, 508, __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, 508, __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_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_stack_event)); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __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; + goto __pyx_L3; + } - /* "hunter/_predicates.pyx":509 - * stack_event.detached = True - * stack_events.appendleft(stack_event) - * frame = frame.f_back # <<<<<<<<<<<<<< - * depth_delta += 1 - * for stack_event in stack_events: + /* "(tree fragment)":11 + * use_setstate = True + * else: + * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state */ - __Pyx_TraceLine(509,0,__PYX_ERR(0, 509, __pyx_L1_error)) - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_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; + __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_L3:; - /* "hunter/_predicates.pyx":510 - * stack_events.appendleft(stack_event) - * frame = frame.f_back - * depth_delta += 1 # <<<<<<<<<<<<<< - * for stack_event in stack_events: - * if self._filter is None or self._filter(stack_event): + /* "(tree fragment)":12 + * else: + * use_setstate = self.predicates is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * else: */ - __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __pyx_L1_error)) - __pyx_v_depth_delta = (__pyx_v_depth_delta + 1); - } + __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_use_setstate != 0); + if (__pyx_t_3) { - /* "hunter/_predicates.pyx":511 - * frame = frame.f_back - * depth_delta += 1 - * for stack_event in stack_events: # <<<<<<<<<<<<<< - * if self._filter is None or self._filter(stack_event): - * self.action(stack_event) + /* "(tree fragment)":13 + * use_setstate = self.predicates is not None + * if use_setstate: + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) */ - __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); - } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 511, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2)); - __pyx_t_2 = 0; + __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_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_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); + __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; - /* "hunter/_predicates.pyx":512 - * depth_delta += 1 - * for stack_event in stack_events: - * if self._filter is None or self._filter(stack_event): # <<<<<<<<<<<<<< - * self.action(stack_event) - * for backlog_event in self.queue: + /* "(tree fragment)":12 + * else: + * use_setstate = self.predicates is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * else: */ - __Pyx_TraceLine(512,0,__PYX_ERR(0, 512, __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_L16_bool_binop_done; - } - __Pyx_INCREF(__pyx_v_self->_filter); - __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 512, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __pyx_t_11; - __pyx_L16_bool_binop_done:; - if (__pyx_t_8) { + } - /* "hunter/_predicates.pyx":513 - * for stack_event in stack_events: - * if self._filter is None or self._filter(stack_event): - * self.action(stack_event) # <<<<<<<<<<<<<< - * for backlog_event in self.queue: - * if self._filter is None: + /* "(tree fragment)":15 + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + * else: + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Or__set_state(self, __pyx_state) */ - __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_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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; + __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_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_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); + __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; + } - /* "hunter/_predicates.pyx":512 - * depth_delta += 1 - * for stack_event in stack_events: - * if self._filter is None or self._filter(stack_event): # <<<<<<<<<<<<<< - * self.action(stack_event) - * for backlog_event in self.queue: + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ - } - /* "hunter/_predicates.pyx":511 - * frame = frame.f_back - * depth_delta += 1 - * for stack_event in stack_events: # <<<<<<<<<<<<<< - * if self._filter is None or self._filter(stack_event): - * self.action(stack_event) - */ - __Pyx_TraceLine(511,0,__PYX_ERR(0, 511, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* 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.Or.__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; +} - /* "hunter/_predicates.pyx":493 - * else: - * first_frame = first_event.frame - * if first_frame is not None: # <<<<<<<<<<<<<< - * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full - * frame = first_frame +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Or__set_state(self, __pyx_state) */ - } - /* "hunter/_predicates.pyx":488 - * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid - * 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 - */ - } +/* 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) { + 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)); - /* "hunter/_predicates.pyx":514 - * if self._filter is None or self._filter(stack_event): - * self.action(stack_event) - * for backlog_event in self.queue: # <<<<<<<<<<<<<< - * if self._filter is None: - * self.action(backlog_event) + /* 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) { + PyObject *__pyx_r = NULL; + __Pyx_TraceDeclarations + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __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_Or, (type(self), 0xaa8cbda, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Or__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(514,0,__PYX_ERR(0, 514, __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, 514, __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, 514, __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, 514, __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, 514, __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, 514, __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, 514, __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, 514, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_2); - } - __Pyx_XDECREF_SET(__pyx_v_backlog_event, __pyx_t_2); - __pyx_t_2 = 0; + __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_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":515 - * self.action(stack_event) - * for backlog_event in self.queue: - * if self._filter is None: # <<<<<<<<<<<<<< - * self.action(backlog_event) - * elif self._filter(backlog_event): + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Or__set_state(self, __pyx_state) */ - __Pyx_TraceLine(515,0,__PYX_ERR(0, 515, __pyx_L1_error)) - __pyx_t_8 = (__pyx_v_self->_filter == Py_None); - __pyx_t_11 = (__pyx_t_8 != 0); - if (__pyx_t_11) { - /* "hunter/_predicates.pyx":516 - * for backlog_event in self.queue: - * if self._filter is None: - * self.action(backlog_event) # <<<<<<<<<<<<<< - * elif self._filter(backlog_event): - * self.action(backlog_event) + /* 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.Or.__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":494 + * return Not(self) + * + * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< + * for predicate in self.predicates: + * if fast_call(predicate, event): */ - __Pyx_TraceLine(516,0,__PYX_ERR(0, 516, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_self->action); - __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __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":515 - * self.action(stack_event) - * for backlog_event in self.queue: - * if self._filter is None: # <<<<<<<<<<<<<< - * self.action(backlog_event) - * elif self._filter(backlog_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; + Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_3 = NULL; + int __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("fast_Or_call", 0); + __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 494, 0, __PYX_ERR(0, 494, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":495 + * + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if fast_call(predicate, event): + * return True */ - goto __pyx_L20; - } + __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + if (unlikely(__pyx_v_self->predicates == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 495, __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, 495, __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, 495, __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":517 - * if self._filter is None: - * self.action(backlog_event) - * elif self._filter(backlog_event): # <<<<<<<<<<<<<< - * self.action(backlog_event) - * self.queue.clear() + /* "hunter/_predicates.pyx":496 + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: + * if fast_call(predicate, event): # <<<<<<<<<<<<<< + * return True + * else: */ - __Pyx_TraceLine(517,0,__PYX_ERR(0, 517, __pyx_L1_error)) - __Pyx_INCREF(__pyx_v_self->_filter); - __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 517, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_11) { + __Pyx_TraceLine(496,0,__PYX_ERR(0, 496, __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, 496, __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, 496, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (__pyx_t_4) { - /* "hunter/_predicates.pyx":518 - * self.action(backlog_event) - * elif self._filter(backlog_event): - * self.action(backlog_event) # <<<<<<<<<<<<<< - * self.queue.clear() + /* "hunter/_predicates.pyx":497 + * for predicate in self.predicates: + * if fast_call(predicate, event): + * return True # <<<<<<<<<<<<<< * else: + * return False */ - __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_12 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_12); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_2 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 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; + __Pyx_TraceLine(497,0,__PYX_ERR(0, 497, __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":517 - * if self._filter is None: - * self.action(backlog_event) - * elif self._filter(backlog_event): # <<<<<<<<<<<<<< - * self.action(backlog_event) - * self.queue.clear() + /* "hunter/_predicates.pyx":496 + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: + * if fast_call(predicate, event): # <<<<<<<<<<<<<< + * return True + * else: */ - } - __pyx_L20:; + } - /* "hunter/_predicates.pyx":514 - * if self._filter is None or self._filter(stack_event): - * self.action(stack_event) - * for backlog_event in self.queue: # <<<<<<<<<<<<<< - * if self._filter is None: - * self.action(backlog_event) + /* "hunter/_predicates.pyx":495 + * + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if fast_call(predicate, event): + * return True */ - __Pyx_TraceLine(514,0,__PYX_ERR(0, 514, __pyx_L1_error)) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + } + /*else*/ { - /* "hunter/_predicates.pyx":519 - * elif self._filter(backlog_event): - * self.action(backlog_event) - * self.queue.clear() # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":499 + * return True * else: - * if self.strip and event.depth < 1: + * return False # <<<<<<<<<<<<<< + * + * */ - __Pyx_TraceLine(519,0,__PYX_ERR(0, 519, __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, 519, __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, 519, __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; + __Pyx_TraceLine(499,0,__PYX_ERR(0, 499, __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":480 - * result = fast_call(self.condition, event) - * if result: - * if self.queue: # <<<<<<<<<<<<<< - * self.action.cleanup() + /* "hunter/_predicates.pyx":495 * + * cdef inline fast_Or_call(Or self, Event event): + * for predicate in self.predicates: # <<<<<<<<<<<<<< + * if fast_call(predicate, event): + * return True */ - } + __Pyx_TraceLine(495,0,__PYX_ERR(0, 495, __pyx_L1_error)) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":479 + /* "hunter/_predicates.pyx":494 + * return Not(self) * - * result = fast_call(self.condition, event) - * if result: # <<<<<<<<<<<<<< - * if self.queue: - * self.action.cleanup() + * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< + * for predicate in self.predicates: + * if fast_call(predicate, event): */ - goto __pyx_L3; - } - /* "hunter/_predicates.pyx":521 - * 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. + /* 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_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 + * `Not` predicate. + * """ + * def __init__(self, predicate): # <<<<<<<<<<<<<< + * self.predicate = predicate + * */ - __Pyx_TraceLine(521,0,__PYX_ERR(0, 521, __pyx_L1_error)) - /*else*/ { - __pyx_t_8 = (__pyx_v_self->strip != 0); - if (__pyx_t_8) { + +/* 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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 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, 506, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; } else { - __pyx_t_11 = __pyx_t_8; - goto __pyx_L22_bool_binop_done; + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } - __pyx_t_8 = ((__pyx_v_event->depth < 1) != 0); - __pyx_t_11 = __pyx_t_8; - __pyx_L22_bool_binop_done:; - if (__pyx_t_11) { + __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, 506, __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); - /* "hunter/_predicates.pyx":524 - * # 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(524,0,__PYX_ERR(0, 524, __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, 524, __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, 524, __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; + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} - /* "hunter/_predicates.pyx":521 - * 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. - */ - } +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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_TraceCall("__init__", __pyx_f[0], 506, 0, __PYX_ERR(0, 506, __pyx_L1_error)); - /* "hunter/_predicates.pyx":525 - * # 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.frame = event.frame + /* "hunter/_predicates.pyx":507 + * """ + * def __init__(self, predicate): + * self.predicate = predicate # <<<<<<<<<<<<<< + * + * def __str__(self): */ - __Pyx_TraceLine(525,0,__PYX_ERR(0, 525, __pyx_L1_error)) - __pyx_t_8 = (__pyx_v_self->_filter == Py_None); - __pyx_t_3 = (__pyx_t_8 != 0); - if (!__pyx_t_3) { - } else { - __pyx_t_11 = __pyx_t_3; - goto __pyx_L25_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, 525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 525, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __pyx_t_3; - __pyx_L25_bool_binop_done:; - if (__pyx_t_11) { + __Pyx_TraceLine(507,0,__PYX_ERR(0, 507, __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":526 - * 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 - * self.queue.append(detached_event) + /* "hunter/_predicates.pyx":506 + * `Not` predicate. + * """ + * def __init__(self, predicate): # <<<<<<<<<<<<<< + * self.predicate = predicate + * */ - __Pyx_TraceLine(526,0,__PYX_ERR(0, 526, __pyx_L1_error)) - if ((__pyx_v_self->vars != 0)) { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __pyx_t_2; - __pyx_t_2 = 0; - } else { - __Pyx_INCREF(Py_None); - __pyx_t_1 = Py_None; - } - __pyx_t_13.__pyx_n = 1; - __pyx_t_13.value_filter = __pyx_t_1; - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, 0, &__pyx_t_13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_detached_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2); - __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":527 - * 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 # <<<<<<<<<<<<<< - * self.queue.append(detached_event) + /* 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":509 + * self.predicate = predicate + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Not(%s)' % self.predicate * */ - __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error)) - __pyx_t_2 = ((PyObject *)__pyx_v_event->frame); - __Pyx_INCREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GOTREF(__pyx_v_detached_event->frame); - __Pyx_DECREF(((PyObject *)__pyx_v_detached_event->frame)); - __pyx_v_detached_event->frame = ((PyFrameObject *)__pyx_t_2); - __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":528 - * detached_event = event.detach(self.action.try_repr if self.vars else None) - * detached_event.frame = event.frame - * self.queue.append(detached_event) # <<<<<<<<<<<<<< +/* 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)); + + /* 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__str__", 0); + __Pyx_TraceCall("__str__", __pyx_f[0], 509, 0, __PYX_ERR(0, 509, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":510 * - * return result + * def __str__(self): + * return 'Not(%s)' % self.predicate # <<<<<<<<<<<<<< + * + * def __repr__(self): */ - __Pyx_TraceLine(528,0,__PYX_ERR(0, 528, __pyx_L1_error)) - __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_TraceLine(510,0,__PYX_ERR(0, 510, __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, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "hunter/_predicates.pyx":525 - * # 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.frame = event.frame + /* "hunter/_predicates.pyx":509 + * self.predicate = predicate + * + * def __str__(self): # <<<<<<<<<<<<<< + * return 'Not(%s)' % self.predicate + * */ - } - } - __pyx_L3:; - /* "hunter/_predicates.pyx":530 - * self.queue.append(detached_event) + /* 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":512 + * return 'Not(%s)' % self.predicate * - * return result # <<<<<<<<<<<<<< + * 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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__repr__", 0); + __Pyx_TraceCall("__repr__", __pyx_f[0], 512, 0, __PYX_ERR(0, 512, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":513 + * + * def __repr__(self): + * return '' % self.predicate # <<<<<<<<<<<<<< * + * def __eq__(self, other): */ - __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error)) + __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_result); - __pyx_r = __pyx_v_result; + __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, 513, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":464 - * ) + /* "hunter/_predicates.pyx":512 + * return 'Not(%s)' % self.predicate + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return '' % self.predicate * - * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< - * cdef bint first_is_call - * cdef Event detached_event */ /* 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_12); - __Pyx_AddTraceback("hunter._predicates.fast_Backlog_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; + __Pyx_AddTraceback("hunter._predicates.Not.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_detached_event); - __Pyx_XDECREF((PyObject *)__pyx_v_first_event); - __Pyx_XDECREF((PyObject *)__pyx_v_stack_event); - __Pyx_XDECREF((PyObject *)__pyx_v_first_frame); - __Pyx_XDECREF((PyObject *)__pyx_v_frame); - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XDECREF(__pyx_v_stack_events); - __Pyx_XDECREF(__pyx_v_backlog_event); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":538 - * `And` predicate. Exits at the first sub-predicate that returns ``False``. - * """ - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates +/* "hunter/_predicates.pyx":515 + * return '' % self.predicate * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Not) */ /* 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; +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("__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); + __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_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; +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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 538, 0, __PYX_ERR(0, 538, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__eq__", 0); + __Pyx_TraceCall("__eq__", __pyx_f[0], 515, 0, __PYX_ERR(0, 515, __pyx_L1_error)); - /* "hunter/_predicates.pyx":539 - * """ - * def __init__(self, *predicates): - * self.predicates = predicates # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":516 * - * def __str__(self): + * def __eq__(self, other): + * return ( # <<<<<<<<<<<<<< + * isinstance(other, Not) + * and self.predicate == ( other).predicate */ - __Pyx_TraceLine(539,0,__PYX_ERR(0, 539, __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(516,0,__PYX_ERR(0, 516, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + + /* "hunter/_predicates.pyx":517 + * def __eq__(self, other): + * return ( + * isinstance(other, Not) # <<<<<<<<<<<<<< + * and self.predicate == ( other).predicate + * ) + */ + __Pyx_TraceLine(517,0,__PYX_ERR(0, 517, __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, 517, __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":518 + * return ( + * isinstance(other, Not) + * and self.predicate == ( other).predicate # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(518,0,__PYX_ERR(0, 518, __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, 518, __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":538 - * `And` predicate. Exits at the first sub-predicate that returns ``False``. - * """ - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates + /* "hunter/_predicates.pyx":515 + * return '' % self.predicate * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Not) */ /* 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_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_TraceReturn(Py_None, 0); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":541 - * self.predicates = predicates +/* "hunter/_predicates.pyx":521 + * ) * - * def __str__(self): # <<<<<<<<<<<<<< - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Not', self.predicate)) * */ /* 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; +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("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_2__str__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __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 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":542 - * - * 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; +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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __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, 542, __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_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, 542, __pyx_L1_error) - __Pyx_DECREF(__pyx_cur_scope); - __Pyx_RefNannyFinishContext(); - return (PyObject *) gen; - } + __Pyx_RefNannySetupContext("__hash__", 0); + __Pyx_TraceCall("__hash__", __pyx_f[0], 521, 0, __PYX_ERR(0, 521, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":522 + * + * def __hash__(self): + * return hash(('Not', self.predicate)) # <<<<<<<<<<<<<< + * + * def __call__(self, Event event): + */ + __Pyx_TraceLine(522,0,__PYX_ERR(0, 522, __pyx_L1_error)) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __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, 522, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":521 + * ) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Not', self.predicate)) + * + */ /* 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_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; } -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); - PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - PyObject *__pyx_t_3 = NULL; +/* "hunter/_predicates.pyx":524 + * 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; + PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __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, 542, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 542, __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, 542, __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, 542, __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, 542, __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, 542, __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, 542, __pyx_L1_error) + __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, 524, __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]); } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__call__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 524, __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, 524, __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 */ - 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_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_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":541 - * self.predicates = predicates - * - * def __str__(self): # <<<<<<<<<<<<<< - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) - * - */ - -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; +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; - PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __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, 541, __pyx_L1_error) - } else { - __Pyx_GOTREF(__pyx_cur_scope); - } - __Pyx_TraceCall("__str__", __pyx_f[0], 541, 0, __PYX_ERR(0, 541, __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_RefNannySetupContext("__call__", 0); + __Pyx_TraceCall("__call__", __pyx_f[0], 524, 0, __PYX_ERR(0, 524, __pyx_L1_error)); - /* "hunter/_predicates.pyx":542 + /* "hunter/_predicates.pyx":525 * - * def __str__(self): - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) # <<<<<<<<<<<<<< + * def __call__(self, Event event): + * return fast_Not_call(self, event) # <<<<<<<<<<<<<< * - * def __repr__(self): + * def __or__(self, other): */ - __Pyx_TraceLine(542,0,__PYX_ERR(0, 542, __pyx_L1_error)) + __Pyx_TraceLine(525,0,__PYX_ERR(0, 525, __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, 542, __pyx_L1_error) + __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, 525, __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, 542, __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, 542, __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":541 - * self.predicates = predicates + /* "hunter/_predicates.pyx":524 + * return hash(('Not', self.predicate)) * - * def __str__(self): # <<<<<<<<<<<<<< - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + * def __call__(self, Event event): # <<<<<<<<<<<<<< + * return fast_Not_call(self, event) * */ /* 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_AddTraceback("hunter._predicates.Not.__call__", __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":544 - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % (self.predicates,) +/* "hunter/_predicates.pyx":527 + * 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_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_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("__repr__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_4__repr__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __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_3And_4__repr__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { +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 - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 544, 0, __PYX_ERR(0, 544, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__or__", 0); + __Pyx_TraceCall("__or__", __pyx_f[0], 527, 0, __PYX_ERR(0, 527, __pyx_L1_error)); - /* "hunter/_predicates.pyx":545 + /* "hunter/_predicates.pyx":528 * - * def __repr__(self): - * return '' % (self.predicates,) # <<<<<<<<<<<<<< + * def __or__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(And(( self).predicate, ( other).predicate)) + * else: + */ + __Pyx_TraceLine(528,0,__PYX_ERR(0, 528, __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":529 + * 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(529,0,__PYX_ERR(0, 529, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __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, 529, __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, 529, __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":528 * - * def __eq__(self, other): + * def __or__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(And(( self).predicate, ( other).predicate)) + * else: */ - __Pyx_TraceLine(545,0,__PYX_ERR(0, 545, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __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, 545, __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":544 - * return 'And(%s)' % ', '.join(str(p) for p in self.predicates) + /* "hunter/_predicates.pyx":531 + * return Not(And(( self).predicate, ( other).predicate)) + * else: + * return Or(self, other) # <<<<<<<<<<<<<< * - * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % (self.predicates,) + * def __and__(self, other): + */ + __Pyx_TraceLine(531,0,__PYX_ERR(0, 531, __pyx_L1_error)) + /*else*/ { + __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(__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, 531, __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":527 + * 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_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("hunter._predicates.And.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __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); @@ -16038,98 +15838,138 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":547 - * return '' % (self.predicates,) +/* "hunter/_predicates.pyx":533 + * return Or(self, other) * - * def __eq__(self, other): # <<<<<<<<<<<<<< - * return ( - * isinstance(other, And) + * 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_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_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("__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_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_3And_6__eq__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self, PyObject *__pyx_v_other) { +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 - PyObject *__pyx_t_1 = NULL; + int __pyx_t_1; int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 547, 0, __PYX_ERR(0, 547, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__and__", 0); + __Pyx_TraceCall("__and__", __pyx_f[0], 533, 0, __PYX_ERR(0, 533, __pyx_L1_error)); - /* "hunter/_predicates.pyx":548 + /* "hunter/_predicates.pyx":534 * - * def __eq__(self, other): - * return ( # <<<<<<<<<<<<<< - * isinstance(other, And) - * and self.predicates == ( other).predicates - */ - __Pyx_TraceLine(548,0,__PYX_ERR(0, 548, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - - /* "hunter/_predicates.pyx":549 - * def __eq__(self, other): - * return ( - * isinstance(other, And) # <<<<<<<<<<<<<< - * and self.predicates == ( other).predicates - * ) + * def __and__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(Or(( self).predicate, ( other).predicate)) + * else: */ - __Pyx_TraceLine(549,0,__PYX_ERR(0, 549, __pyx_L1_error)) - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_And); - if (__pyx_t_2) { + __Pyx_TraceLine(534,0,__PYX_ERR(0, 534, __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_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L3_bool_binop_done; + 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":550 - * return ( - * isinstance(other, And) - * and self.predicates == ( other).predicates # <<<<<<<<<<<<<< - * ) + /* "hunter/_predicates.pyx":535 + * 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(535,0,__PYX_ERR(0, 535, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __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, 535, __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, 535, __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":534 * + * def __and__(self, other): + * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< + * return Not(Or(( self).predicate, ( other).predicate)) + * else: */ - __Pyx_TraceLine(550,0,__PYX_ERR(0, 550, __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, 550, __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":547 - * return '' % (self.predicates,) + /* "hunter/_predicates.pyx":537 + * return Not(Or(( self).predicate, ( other).predicate)) + * else: + * return And(self, other) # <<<<<<<<<<<<<< * - * def __eq__(self, other): # <<<<<<<<<<<<<< - * return ( - * isinstance(other, And) + * def __invert__(self): + */ + __Pyx_TraceLine(537,0,__PYX_ERR(0, 537, __pyx_L1_error)) + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __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, 537, __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":533 + * 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_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.And.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __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); @@ -16138,184 +15978,107 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":553 - * ) +/* "hunter/_predicates.pyx":539 + * return And(self, other) * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('And', self.predicates)) + * def __invert__(self): # <<<<<<<<<<<<<< + * return self.predicate * */ /* 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) { - Py_hash_t __pyx_r; +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("__hash__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_8__hash__(((struct __pyx_obj_6hunter_11_predicates_And *)__pyx_v_self)); + __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 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; +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 - PyObject *__pyx_t_1 = NULL; - Py_hash_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 553, 0, __PYX_ERR(0, 553, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__invert__", 0); + __Pyx_TraceCall("__invert__", __pyx_f[0], 539, 0, __PYX_ERR(0, 539, __pyx_L1_error)); - /* "hunter/_predicates.pyx":554 + /* "hunter/_predicates.pyx":540 * - * def __hash__(self): - * return hash(('And', self.predicates)) # <<<<<<<<<<<<<< + * def __invert__(self): + * return self.predicate # <<<<<<<<<<<<<< * - * def __call__(self, Event event): + * cdef inline fast_Not_call(Not self, Event event): */ - __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __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, 554, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; + __Pyx_TraceLine(540,0,__PYX_ERR(0, 540, __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":553 - * ) + /* "hunter/_predicates.pyx":539 + * return And(self, other) * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('And', self.predicates)) + * def __invert__(self): # <<<<<<<<<<<<<< + * return self.predicate * */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.And.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; + __Pyx_AddTraceback("hunter._predicates.Not.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; - __Pyx_TraceReturn(Py_None, 0); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":556 - * return hash(('And', self.predicates)) - * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_And_call(self, event) +/* "hunter/_predicates.pxd":34 + * cdef class Not: + * cdef: + * readonly object predicate # <<<<<<<<<<<<<< * + * @cython.final */ /* 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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +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("__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, 556, __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, 556, __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, 556, __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("__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 */ - 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_3Not_9predicate___get__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 556, 0, __PYX_ERR(0, 556, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":557 - * - * def __call__(self, Event event): - * return fast_And_call(self, event) # <<<<<<<<<<<<<< - * - * def __or__(self, other): - */ - __Pyx_TraceLine(557,0,__PYX_ERR(0, 557, __pyx_L1_error)) + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 34, 0, __PYX_ERR(1, 34, __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, 557, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_v_self->predicate); + __pyx_r = __pyx_v_self->predicate; goto __pyx_L0; - /* "hunter/_predicates.pyx":556 - * return hash(('And', self.predicates)) - * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_And_call(self, event) - * - */ - /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.And.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Not.predicate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -16324,285 +16087,273 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":559 - * return fast_And_call(self, event) - * - * def __or__(self, other): # <<<<<<<<<<<<<< - * return Or(self, other) - * +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ /* 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_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("__or__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3And_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __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_3And_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +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; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 559, 0, __PYX_ERR(0, 559, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); - /* "hunter/_predicates.pyx":560 - * - * def __or__(self, other): - * return Or(self, other) # <<<<<<<<<<<<<< - * - * def __and__(self, other): + /* "(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(560,0,__PYX_ERR(0, 560, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) + __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); - __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, 560, __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":559 - * 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":562 - * 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)); + __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; - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "(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; -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 - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 562, 0, __PYX_ERR(0, 562, __pyx_L1_error)); + /* "(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) { - /* "hunter/_predicates.pyx":564 - * def __and__(self, other): - * cdef list predicates - * if type(self) is And: # <<<<<<<<<<<<<< - * predicates = list((self).predicates) - * else: + /* "(tree fragment)":8 + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: + * state += (_dict,) # <<<<<<<<<<<<<< + * use_setstate = True + * else: */ - __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __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) { + __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; - /* "hunter/_predicates.pyx":565 - * cdef list predicates - * if type(self) is And: - * predicates = list((self).predicates) # <<<<<<<<<<<<<< - * else: - * predicates = [self] + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * use_setstate = self.predicate is not None */ - __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __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, 565, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_predicates = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) + __pyx_v_use_setstate = 1; - /* "hunter/_predicates.pyx":564 - * def __and__(self, other): - * cdef list predicates - * if type(self) is And: # <<<<<<<<<<<<<< - * predicates = list((self).predicates) - * else: + /* "(tree fragment)":7 + * state = (self.predicate,) + * _dict = getattr(self, '__dict__', None) + * if _dict is not None: # <<<<<<<<<<<<<< + * state += (_dict,) + * use_setstate = True */ goto __pyx_L3; } - /* "hunter/_predicates.pyx":567 - * predicates = list((self).predicates) - * else: - * predicates = [self] # <<<<<<<<<<<<<< - * if isinstance(other, And): - * predicates.extend(( other).predicates) + /* "(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(567,0,__PYX_ERR(0, 567, __pyx_L1_error)) + __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __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_t_3 = (__pyx_v_self->predicate != Py_None); + __pyx_v_use_setstate = __pyx_t_3; } __pyx_L3:; - /* "hunter/_predicates.pyx":568 - * else: - * predicates = [self] - * if isinstance(other, And): # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) - * else: + /* "(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(568,0,__PYX_ERR(0, 568, __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) { + __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_use_setstate != 0); + if (__pyx_t_3) { - /* "hunter/_predicates.pyx":569 - * predicates = [self] - * if isinstance(other, And): - * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< - * else: - * predicates.append(other) + /* "(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(569,0,__PYX_ERR(0, 569, __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, 569, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __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; - /* "hunter/_predicates.pyx":568 - * else: - * predicates = [self] - * if isinstance(other, And): # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) - * else: + /* "(tree fragment)":12 + * else: + * use_setstate = self.predicate is not None + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state + * else: */ - goto __pyx_L4; } - /* "hunter/_predicates.pyx":571 - * predicates.extend(( other).predicates) - * else: - * predicates.append(other) # <<<<<<<<<<<<<< - * return And(*predicates) - * + /* "(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(571,0,__PYX_ERR(0, 571, __pyx_L1_error)) + __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __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, 571, __pyx_L1_error) + __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; } - __pyx_L4:; - - /* "hunter/_predicates.pyx":572 - * else: - * predicates.append(other) - * return And(*predicates) # <<<<<<<<<<<<<< - * - * def __invert__(self): - */ - __Pyx_TraceLine(572,0,__PYX_ERR(0, 572, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __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, 572, __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":562 - * return Or(self, other) - * - * def __and__(self, other): # <<<<<<<<<<<<<< - * cdef list predicates - * if type(self) is And: + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.And.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Not.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_predicates); + __Pyx_XDECREF(__pyx_v_state); + __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":574 - * return And(*predicates) - * - * def __invert__(self): # <<<<<<<<<<<<<< - * return Not(self) - * +/* "(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_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_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("__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("__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_3And_16__invert__(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v_self) { +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 @@ -16610,36 +16361,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3And_16__invert__(struct __pyx_o int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 574, 0, __PYX_ERR(0, 574, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); - /* "hunter/_predicates.pyx":575 - * - * def __invert__(self): - * return Not(self) # <<<<<<<<<<<<<< - * - * cdef inline fast_And_call(And self, Event event): + /* "(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(575,0,__PYX_ERR(0, 575, __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, 575, __pyx_L1_error) + __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_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":574 - * return And(*predicates) - * - * def __invert__(self): # <<<<<<<<<<<<<< - * return Not(self) - * + /* "(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.And.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Not.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -16648,45 +16396,63 @@ 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":542 + * return self.predicate + * + * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< + * return not fast_call(self.predicate, event) * - * @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) { - 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)); - - /* 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 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 24, 0, __PYX_ERR(1, 24, __pyx_L1_error)); + __Pyx_RefNannySetupContext("fast_Not_call", 0); + __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 542, 0, __PYX_ERR(0, 542, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":543 + * + * cdef inline fast_Not_call(Not self, Event event): + * return not fast_call(self.predicate, event) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_TraceLine(543,0,__PYX_ERR(0, 543, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->predicates); - __pyx_r = __pyx_v_self->predicates; + __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, 543, __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, 543, __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, 543, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; + /* "hunter/_predicates.pyx":542 + * 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_AddTraceback("hunter._predicates.And.predicates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __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); @@ -16694,822 +16460,1063 @@ 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":546 + * + * + * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< + * if type(callable) is Query: + * return fast_Query_call( callable, event) */ -/* 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) { - 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)); - - /* function exit code */ - __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 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 - PyObject *__pyx_t_1 = NULL; + int __pyx_t_1; int __pyx_t_2; - int __pyx_t_3; + PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + __Pyx_RefNannySetupContext("fast_call", 0); + __Pyx_TraceCall("fast_call", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __pyx_L1_error)); - /* "(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":547 + * + * 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(547,0,__PYX_ERR(0, 547, __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":548 + * 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(548,0,__PYX_ERR(0, 548, __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, 548, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":547 + * + * 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":549 + * 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(549,0,__PYX_ERR(0, 549, __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":550 + * 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(550,0,__PYX_ERR(0, 550, __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, 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 + * 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":551 + * 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(551,0,__PYX_ERR(0, 551, __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":552 + * 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(552,0,__PYX_ERR(0, 552, __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, 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 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":553 + * 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(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->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; + __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_Not)); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { - /* "(tree fragment)":6 - * cdef bint use_setstate - * state = (self.predicates,) - * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< - * if _dict is not None: - * state += (_dict,) + /* "hunter/_predicates.pyx":554 + * 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(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; + __Pyx_TraceLine(554,0,__PYX_ERR(0, 554, __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, 554, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; - /* "(tree fragment)":7 - * state = (self.predicates,) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "hunter/_predicates.pyx":553 + * 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(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: + /* "hunter/_predicates.pyx":555 + * 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(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; + __Pyx_TraceLine(555,0,__PYX_ERR(0, 555, __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) { - /* "(tree fragment)":9 - * if _dict is not None: - * state += (_dict,) - * use_setstate = True # <<<<<<<<<<<<<< - * else: - * use_setstate = self.predicates is not None + /* "hunter/_predicates.pyx":556 + * 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(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) - __pyx_v_use_setstate = 1; + __Pyx_TraceLine(556,0,__PYX_ERR(0, 556, __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, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; - /* "(tree fragment)":7 - * state = (self.predicates,) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "hunter/_predicates.pyx":555 + * 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: */ - goto __pyx_L3; } - /* "(tree fragment)":11 - * use_setstate = True - * else: - * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< - * if use_setstate: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + /* "hunter/_predicates.pyx":557 + * 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(557,0,__PYX_ERR(0, 557, __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":558 + * 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(558,0,__PYX_ERR(0, 558, __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, 558, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":557 + * 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(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_L3:; - /* "(tree fragment)":12 - * else: - * use_setstate = self.predicates is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + /* "hunter/_predicates.pyx":559 + * 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(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_use_setstate != 0); - if (__pyx_t_3) { + __Pyx_TraceLine(559,0,__PYX_ERR(0, 559, __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) { - /* "(tree fragment)":13 - * use_setstate = self.predicates is not None - * if use_setstate: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":560 + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: + * return fast_Backlog_call( callable, event) # <<<<<<<<<<<<<< * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) + * return callable(event) */ - __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) + __Pyx_TraceLine(560,0,__PYX_ERR(0, 560, __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_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); - __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; + __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, 560, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "(tree fragment)":12 - * else: - * use_setstate = self.predicates is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + /* "hunter/_predicates.pyx":559 + * elif type(callable) is From: + * return fast_From_call( callable, event) + * elif type(callable) is Backlog: # <<<<<<<<<<<<<< + * return fast_Backlog_call( callable, event) * else: */ } - /* "(tree fragment)":15 - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, None), state + /* "hunter/_predicates.pyx":562 + * return fast_Backlog_call( callable, event) * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_And__set_state(self, __pyx_state) + * return callable(event) # <<<<<<<<<<<<<< + * + * */ - __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) + __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __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_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_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); - __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; + __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, 562, __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; } - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict + /* "hunter/_predicates.pyx":546 + * + * + * 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_1); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.And.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __Pyx_AddTraceback("hunter._predicates.fast_call", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; __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_And, (type(self), 0xaa8cbda, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_And__set_state(self, __pyx_state) +/* "hunter/_predicates.pyx":567 + * @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 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; +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_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + int __pyx_r; __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_RefNannySetupContext("__init__ (wrapper)", 0); + { + 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, 567, __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, 567, __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_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) { - PyObject *__pyx_r = NULL; +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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __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_And, (type(self), 0xaa8cbda, state) - * def __setstate_cython__(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_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; + __Pyx_RefNannySetupContext("__init__", 0); + __Pyx_TraceCall("__init__", __pyx_f[0], 567, 0, __PYX_ERR(0, 567, __pyx_L1_error)); - /* "(tree fragment)":16 - * else: - * return __pyx_unpickle_And, (type(self), 0xaa8cbda, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_And__set_state(self, __pyx_state) + /* "hunter/_predicates.pyx":568 + * 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(568,0,__PYX_ERR(0, 568, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_inspect); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __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, 568, __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, 568, __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, 568, __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, 568, __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, 568, __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, 568, __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; - /* 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.And.__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":577 - * 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":569 + * 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(569,0,__PYX_ERR(0, 569, __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, 569, __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, 569, __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)) { -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 - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fast_And_call", 0); - __Pyx_TraceCall("fast_And_call", __pyx_f[0], 577, 0, __PYX_ERR(0, 577, __pyx_L1_error)); + /* "hunter/_predicates.pyx":570 + * 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(570,0,__PYX_ERR(0, 570, __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, 570, __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, 570, __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, 570, __pyx_L1_error) - /* "hunter/_predicates.pyx":578 - * - * 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":569 + * 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(578,0,__PYX_ERR(0, 578, __pyx_L1_error)) - if (unlikely(__pyx_v_self->predicates == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 578, __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, 578, __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, 578, __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":579 - * 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":571 + * 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(579,0,__PYX_ERR(0, 579, __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, 579, __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, 579, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = ((!__pyx_t_4) != 0); - if (__pyx_t_5) { + __Pyx_TraceLine(571,0,__PYX_ERR(0, 571, __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":580 - * for predicate in self.predicates: - * if not fast_call(predicate, event): - * return False # <<<<<<<<<<<<<< - * else: - * return True + /* "hunter/_predicates.pyx":572 + * 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(580,0,__PYX_ERR(0, 580, __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(572,0,__PYX_ERR(0, 572, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __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, 572, __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, 572, __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":579 - * 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":573 + * self.condition = condition + * self.queue = deque(maxlen=size) + * self.size = size # <<<<<<<<<<<<<< + * self.stack = stack + * self.strip = strip */ - } + __Pyx_TraceLine(573,0,__PYX_ERR(0, 573, __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, 573, __pyx_L1_error) + __pyx_v_self->size = __pyx_t_8; - /* "hunter/_predicates.pyx":578 - * - * 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":574 + * self.queue = deque(maxlen=size) + * self.size = size + * self.stack = stack # <<<<<<<<<<<<<< + * self.strip = strip + * self.vars = vars */ - __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error)) - } - /*else*/ { + __Pyx_TraceLine(574,0,__PYX_ERR(0, 574, __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, 574, __pyx_L1_error) + __pyx_v_self->stack = __pyx_t_8; - /* "hunter/_predicates.pyx":582 - * return False - * else: - * return True # <<<<<<<<<<<<<< - * - * + /* "hunter/_predicates.pyx":575 + * self.size = size + * self.stack = stack + * self.strip = strip # <<<<<<<<<<<<<< + * self.vars = vars + * self._filter = filter */ - __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __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(575,0,__PYX_ERR(0, 575, __pyx_L1_error)) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_strip); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_v_self->strip = __pyx_t_7; - /* "hunter/_predicates.pyx":578 + /* "hunter/_predicates.pyx":576 + * self.stack = stack + * self.strip = strip + * self.vars = vars # <<<<<<<<<<<<<< + * self._filter = filter * - * cdef inline fast_And_call(And self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if not fast_call(predicate, event): - * return False */ - __Pyx_TraceLine(578,0,__PYX_ERR(0, 578, __pyx_L1_error)) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_TraceLine(576,0,__PYX_ERR(0, 576, __pyx_L1_error)) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_vars); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_v_self->vars = __pyx_t_7; /* "hunter/_predicates.pyx":577 - * return Not(self) + * self.strip = strip + * self.vars = vars + * self._filter = filter # <<<<<<<<<<<<<< * - * cdef inline fast_And_call(And self, Event event): # <<<<<<<<<<<<<< - * for predicate in self.predicates: - * if not fast_call(predicate, event): + * def __call__(self, event): + */ + __Pyx_TraceLine(577,0,__PYX_ERR(0, 577, __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":567 + * @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_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_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_XDECREF(__pyx_v_predicate); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":591 - * """ +/* "hunter/_predicates.pyx":579 + * self._filter = filter * - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates + * def __call__(self, event): # <<<<<<<<<<<<<< + * return fast_Backlog_call(self, event) * */ /* 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; +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; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - if (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); + __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, 579, __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, 579, __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_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; +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 __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 591, 0, __PYX_ERR(0, 591, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__call__", 0); + __Pyx_TraceCall("__call__", __pyx_f[0], 579, 0, __PYX_ERR(0, 579, __pyx_L1_error)); - /* "hunter/_predicates.pyx":592 + /* "hunter/_predicates.pyx":580 * - * def __init__(self, *predicates): - * self.predicates = predicates # <<<<<<<<<<<<<< + * def __call__(self, event): + * return fast_Backlog_call(self, event) # <<<<<<<<<<<<<< * * def __str__(self): */ - __Pyx_TraceLine(592,0,__PYX_ERR(0, 592, __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(580,0,__PYX_ERR(0, 580, __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, 580, __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, 580, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; - /* "hunter/_predicates.pyx":591 - * """ + /* "hunter/_predicates.pyx":579 + * self._filter = filter * - * def __init__(self, *predicates): # <<<<<<<<<<<<<< - * self.predicates = predicates + * def __call__(self, event): # <<<<<<<<<<<<<< + * return fast_Backlog_call(self, event) * */ /* 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_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":594 - * self.predicates = predicates +/* "hunter/_predicates.pyx":582 + * return fast_Backlog_call(self, event) * * def __str__(self): # <<<<<<<<<<<<<< - * return 'Or(%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 */ /* 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) { +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_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 */ - -/* "hunter/_predicates.pyx":595 - * - * 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 - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __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, 595, __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, 595, __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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("genexpr", 0); - __Pyx_TraceCall("genexpr", __pyx_f[0], 595, 0, __PYX_ERR(0, 595, __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, 595, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 595, __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, 595, __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, 595, __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, 595, __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, 595, __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, 595, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4__str__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* 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":594 - * 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; +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; + PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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); - 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, 594, __pyx_L1_error) - } else { - __Pyx_GOTREF(__pyx_cur_scope); - } - __Pyx_TraceCall("__str__", __pyx_f[0], 594, 0, __PYX_ERR(0, 594, __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], 582, 0, __PYX_ERR(0, 582, __pyx_L1_error)); - /* "hunter/_predicates.pyx":595 + /* "hunter/_predicates.pyx":583 * * def __str__(self): - * return 'Or(%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(595,0,__PYX_ERR(0, 595, __pyx_L1_error)) + __Pyx_TraceLine(583,0,__PYX_ERR(0, 583, __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, 595, __pyx_L1_error) + + /* "hunter/_predicates.pyx":584 + * 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(584,0,__PYX_ERR(0, 584, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __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, 595, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __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, 595, __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 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->_filter); __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + + /* "hunter/_predicates.pyx":583 + * + * 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(583,0,__PYX_ERR(0, 583, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Backlog_s_size_s_stack_s_vars_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __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":594 - * self.predicates = predicates + /* "hunter/_predicates.pyx":582 + * return fast_Backlog_call(self, event) * * def __str__(self): # <<<<<<<<<<<<<< - * return 'Or(%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.Or.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __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":597 - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) +/* "hunter/_predicates.pyx":587 + * ) * * 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_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_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_2Or_4__repr__(((struct __pyx_obj_6hunter_11_predicates_Or *)__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_2Or_4__repr__(struct __pyx_obj_6hunter_11_predicates_Or *__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; + PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 597, 0, __PYX_ERR(0, 597, __pyx_L1_error)); + __Pyx_TraceCall("__repr__", __pyx_f[0], 587, 0, __PYX_ERR(0, 587, __pyx_L1_error)); - /* "hunter/_predicates.pyx":598 + /* "hunter/_predicates.pyx":588 * * 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(598,0,__PYX_ERR(0, 598, __pyx_L1_error)) + __Pyx_TraceLine(588,0,__PYX_ERR(0, 588, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) + + /* "hunter/_predicates.pyx":589 + * def __repr__(self): + * return '' % ( + * self.condition, self.size, self.stack, self.vars, self.action, self._filter # <<<<<<<<<<<<<< + * ) + * + */ + __Pyx_TraceLine(589,0,__PYX_ERR(0, 589, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __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, 598, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->_filter); + __pyx_t_1 = 0; __pyx_t_2 = 0; + __pyx_t_3 = 0; + + /* "hunter/_predicates.pyx":588 + * + * def __repr__(self): + * return '' % ( # <<<<<<<<<<<<<< + * self.condition, self.size, self.stack, self.vars, self.action, self._filter + * ) + */ + __Pyx_TraceLine(588,0,__PYX_ERR(0, 588, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_hunter_predicates_Backlog_condi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __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":597 - * return 'Or(%s)' % ', '.join(str(p) for p in self.predicates) + /* "hunter/_predicates.pyx":587 + * ) * * 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.Or.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("hunter._predicates.Backlog.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -17518,28 +17525,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_4__repr__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":600 - * return '' % (self.predicates,) +/* "hunter/_predicates.pyx":592 + * ) * * def __eq__(self, other): # <<<<<<<<<<<<<< * return ( - * isinstance(other, Or) + * isinstance(other, Backlog) 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_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_2Or_6__eq__(((struct __pyx_obj_6hunter_11_predicates_Or *)__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_2Or_6__eq__(struct __pyx_obj_6hunter_11_predicates_Or *__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 @@ -17550,441 +17557,328 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_6__eq__(struct __pyx_obj_6hu const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 600, 0, __PYX_ERR(0, 600, __pyx_L1_error)); + __Pyx_TraceCall("__eq__", __pyx_f[0], 592, 0, __PYX_ERR(0, 592, __pyx_L1_error)); - /* "hunter/_predicates.pyx":601 + /* "hunter/_predicates.pyx":593 * * def __eq__(self, other): * return ( # <<<<<<<<<<<<<< - * isinstance(other, Or) - * and self.predicates == ( other).predicates + * isinstance(other, Backlog) and + * self.condition == ( other).condition and */ - __Pyx_TraceLine(601,0,__PYX_ERR(0, 601, __pyx_L1_error)) + __Pyx_TraceLine(593,0,__PYX_ERR(0, 593, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - /* "hunter/_predicates.pyx":602 + /* "hunter/_predicates.pyx":594 * def __eq__(self, other): * return ( - * isinstance(other, Or) # <<<<<<<<<<<<<< - * and self.predicates == ( other).predicates - * ) + * isinstance(other, Backlog) and # <<<<<<<<<<<<<< + * self.condition == ( other).condition and + * self.size == ( other).size and */ - __Pyx_TraceLine(602,0,__PYX_ERR(0, 602, __pyx_L1_error)) - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_6hunter_11_predicates_Or); + __Pyx_TraceLine(594,0,__PYX_ERR(0, 594, __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, 602, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __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":603 + /* "hunter/_predicates.pyx":595 * return ( - * isinstance(other, Or) - * 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(603,0,__PYX_ERR(0, 603, __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, 603, __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; + __Pyx_TraceLine(595,0,__PYX_ERR(0, 595, __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, 595, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 595, __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":600 - * return '' % (self.predicates,) - * - * def __eq__(self, other): # <<<<<<<<<<<<<< - * return ( - * isinstance(other, Or) + /* "hunter/_predicates.pyx":596 + * 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(596,0,__PYX_ERR(0, 596, __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, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } - /* 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_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "hunter/_predicates.pyx":597 + * 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(597,0,__PYX_ERR(0, 597, __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, 597, __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":606 + /* "hunter/_predicates.pyx":598 + * self.size == ( other).size and + * self.stack == ( other).stack and + * self.vars == ( other).vars and # <<<<<<<<<<<<<< + * self.action == ( other).action * ) - * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Or', self.predicates)) - * */ + __Pyx_TraceLine(598,0,__PYX_ERR(0, 598, __pyx_L1_error)) + __pyx_t_2 = (__pyx_v_self->vars == ((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_other)->vars); + if (__pyx_t_2) { + } else { + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L3_bool_binop_done; + } -/* 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) { - 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)); - - /* 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) { - Py_hash_t __pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - Py_hash_t __pyx_t_2; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 606, 0, __PYX_ERR(0, 606, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":607 - * - * def __hash__(self): - * return hash(('Or', self.predicates)) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":599 + * self.stack == ( other).stack and + * self.vars == ( other).vars and + * self.action == ( other).action # <<<<<<<<<<<<<< + * ) * - * def __call__(self, Event event): */ - __Pyx_TraceLine(607,0,__PYX_ERR(0, 607, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __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_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, 607, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; + __Pyx_TraceLine(599,0,__PYX_ERR(0, 599, __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, 599, __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":606 + /* "hunter/_predicates.pyx":592 * ) * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Or', self.predicates)) - * + * def __eq__(self, other): # <<<<<<<<<<<<<< + * return ( + * isinstance(other, Backlog) and */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Or.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Backlog.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; - __Pyx_TraceReturn(Py_None, 0); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":609 - * return hash(('Or', self.predicates)) +/* "hunter/_predicates.pyx":602 + * ) * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Or_call(self, event) + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * */ /* 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) { - struct __pyx_obj_6hunter_6_event_Event *__pyx_v_event = 0; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; +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("__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, 609, __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, 609, __pyx_L3_error) - __pyx_L3_error:; - __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, 609, __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); + __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_10__hash__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* 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_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; +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; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_hash_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 609, 0, __PYX_ERR(0, 609, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__hash__", 0); + __Pyx_TraceCall("__hash__", __pyx_f[0], 602, 0, __PYX_ERR(0, 602, __pyx_L1_error)); - /* "hunter/_predicates.pyx":610 + /* "hunter/_predicates.pyx":603 * - * def __call__(self, Event event): - * return fast_Or_call(self, event) # <<<<<<<<<<<<<< + * def __hash__(self): + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) # <<<<<<<<<<<<<< * * def __or__(self, other): */ - __Pyx_TraceLine(610,0,__PYX_ERR(0, 610, __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, 610, __pyx_L1_error) + __Pyx_TraceLine(603,0,__PYX_ERR(0, 603, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_n_s_Backlog); + __Pyx_GIVEREF(__pyx_n_s_Backlog); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Backlog); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_4, 5, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_v_self->_filter); __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_5 = PyObject_Hash(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "hunter/_predicates.pyx":609 - * return hash(('Or', self.predicates)) + /* "hunter/_predicates.pyx":602 + * ) * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Or_call(self, event) + * def __hash__(self): # <<<<<<<<<<<<<< + * 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.Or.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("hunter._predicates.Backlog.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_TraceReturn(__pyx_r, 0); + if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; + __Pyx_TraceReturn(Py_None, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":612 - * return fast_Or_call(self, event) +/* "hunter/_predicates.pyx":605 + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * * 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_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("__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_7Backlog_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) { - PyObject *__pyx_v_predicates = 0; +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 - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 612, 0, __PYX_ERR(0, 612, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":614 - * def __or__(self, other): - * cdef list predicates - * if type(self) is Or: # <<<<<<<<<<<<<< - * predicates = list(( self).predicates) - * else: - */ - __Pyx_TraceLine(614,0,__PYX_ERR(0, 614, __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":615 - * cdef list predicates - * if type(self) is Or: - * predicates = list(( self).predicates) # <<<<<<<<<<<<<< - * else: - * predicates = [self] - */ - __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __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, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_predicates = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; - - /* "hunter/_predicates.pyx":614 - * def __or__(self, other): - * cdef list predicates - * if type(self) is Or: # <<<<<<<<<<<<<< - * predicates = list(( self).predicates) - * else: - */ - goto __pyx_L3; - } - - /* "hunter/_predicates.pyx":617 - * predicates = list(( self).predicates) - * else: - * predicates = [self] # <<<<<<<<<<<<<< - * if type(other) is Or: - * predicates.extend(( other).predicates) - */ - __Pyx_TraceLine(617,0,__PYX_ERR(0, 617, __pyx_L1_error)) - /*else*/ { - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __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":618 - * else: - * predicates = [self] - * if type(other) is Or: # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) - * else: - */ - __Pyx_TraceLine(618,0,__PYX_ERR(0, 618, __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":619 - * predicates = [self] - * if type(other) is Or: - * predicates.extend(( other).predicates) # <<<<<<<<<<<<<< - * else: - * predicates.append(other) - */ - __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __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, 619, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "hunter/_predicates.pyx":618 - * else: - * predicates = [self] - * if type(other) is Or: # <<<<<<<<<<<<<< - * predicates.extend(( other).predicates) - * else: - */ - goto __pyx_L4; - } + __Pyx_TraceCall("__or__", __pyx_f[0], 605, 0, __PYX_ERR(0, 605, __pyx_L1_error)); - /* "hunter/_predicates.pyx":621 - * predicates.extend(( other).predicates) - * else: - * predicates.append(other) # <<<<<<<<<<<<<< - * return Or(*predicates) + /* "hunter/_predicates.pyx":606 * - */ - __Pyx_TraceLine(621,0,__PYX_ERR(0, 621, __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, 621, __pyx_L1_error) - } - __pyx_L4:; - - /* "hunter/_predicates.pyx":622 - * else: - * predicates.append(other) - * return Or(*predicates) # <<<<<<<<<<<<<< + * def __or__(self, other): + * return Or(self, other) # <<<<<<<<<<<<<< * * def __and__(self, other): */ - __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error)) + __Pyx_TraceLine(606,0,__PYX_ERR(0, 606, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PySequence_Tuple(__pyx_v_predicates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __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, 622, __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; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __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, 606, __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":612 - * return fast_Or_call(self, event) + /* "hunter/_predicates.pyx":605 + * return hash(('Backlog', self.condition, self.size, self.stack, self.vars, self.action, self._filter)) * * def __or__(self, other): # <<<<<<<<<<<<<< - * cdef list predicates - * if type(self) is Or: + * return Or(self, other) + * */ /* 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_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("hunter._predicates.Backlog.__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":624 - * return Or(*predicates) +/* "hunter/_predicates.pyx":608 + * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< * return And(self, other) @@ -17992,19 +17886,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_12__or__(PyObject *__pyx_v_s */ /* 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) { +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("__and__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_14__and__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __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_2Or_14__and__(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 @@ -18014,18 +17908,18 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __pyx_L1_error)); + __Pyx_TraceCall("__and__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error)); - /* "hunter/_predicates.pyx":625 + /* "hunter/_predicates.pyx":609 * * def __and__(self, other): * return And(self, other) # <<<<<<<<<<<<<< * * def __invert__(self): */ - __Pyx_TraceLine(625,0,__PYX_ERR(0, 625, __pyx_L1_error)) + __Pyx_TraceLine(609,0,__PYX_ERR(0, 609, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __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_v_self); __Pyx_GIVEREF(__pyx_v_self); @@ -18033,15 +17927,15 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(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_And), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __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, 609, __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":624 - * return Or(*predicates) + /* "hunter/_predicates.pyx":608 + * return Or(self, other) * * def __and__(self, other): # <<<<<<<<<<<<<< * return And(self, other) @@ -18052,7 +17946,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ __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_AddTraceback("hunter._predicates.Backlog.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -18061,65 +17955,94 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_14__and__(PyObject *__pyx_v_ return __pyx_r; } -/* "hunter/_predicates.pyx":627 +/* "hunter/_predicates.pyx":611 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< - * return Not(self) + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) * */ /* 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_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("__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_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_2Or_16__invert__(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v_self) { +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 PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 627, 0, __PYX_ERR(0, 627, __pyx_L1_error)); + __Pyx_TraceCall("__invert__", __pyx_f[0], 611, 0, __PYX_ERR(0, 611, __pyx_L1_error)); - /* "hunter/_predicates.pyx":628 + /* "hunter/_predicates.pyx":612 * * def __invert__(self): - * return Not(self) # <<<<<<<<<<<<<< + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) # <<<<<<<<<<<<<< * - * cdef inline fast_Or_call(Or self, Event event): + * def __ror__(self, other): */ - __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __pyx_L1_error)) + __Pyx_TraceLine(612,0,__PYX_ERR(0, 612, __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, 628, __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, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __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, 612, __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, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_t_3) < 0) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __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, 612, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vars, __pyx_t_3) < 0) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_action, __pyx_v_self->action) < 0) __PYX_ERR(0, 612, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_filter, __pyx_v_self->_filter) < 0) __PYX_ERR(0, 612, __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, 612, __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":627 + /* "hunter/_predicates.pyx":611 * return And(self, other) * * def __invert__(self): # <<<<<<<<<<<<<< - * return Not(self) + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("hunter._predicates.Or.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("hunter._predicates.Backlog.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -18128,44 +18051,76 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_16__invert__(struct __pyx_ob return __pyx_r; } -/* "hunter/_predicates.pxd":29 - * cdef class Or: - * cdef: - * readonly tuple predicates # <<<<<<<<<<<<<< +/* "hunter/_predicates.pyx":614 + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) + * + * def __ror__(self, other): # <<<<<<<<<<<<<< + * return Or(other, self) * - * @cython.final */ /* 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_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("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(((struct __pyx_obj_6hunter_11_predicates_Or *)__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_2Or_10predicates___get__(struct __pyx_obj_6hunter_11_predicates_Or *__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; + PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 29, 0, __PYX_ERR(1, 29, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__ror__", 0); + __Pyx_TraceCall("__ror__", __pyx_f[0], 614, 0, __PYX_ERR(0, 614, __pyx_L1_error)); + + /* "hunter/_predicates.pyx":615 + * + * def __ror__(self, other): + * return Or(other, self) # <<<<<<<<<<<<<< + * + * def __rand__(self, other): + */ + __Pyx_TraceLine(615,0,__PYX_ERR(0, 615, __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, 615, __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_Or), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __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":614 + * return Backlog(Not(self.condition), size=self.size, stack=self.stack, vars=self.vars, action=self.action, filter=self._filter) + * + * def __ror__(self, other): # <<<<<<<<<<<<<< + * return Or(other, self) + * + */ + /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Or.predicates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __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); @@ -18174,307 +18129,342 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_10predicates___get__(struct return __pyx_r; } -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict +/* "hunter/_predicates.pyx":617 + * return Or(other, self) + * + * def __rand__(self, other): # <<<<<<<<<<<<<< + * return And(other, self) + * */ /* 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_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("__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_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_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; +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 PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__rand__", 0); + __Pyx_TraceCall("__rand__", __pyx_f[0], 617, 0, __PYX_ERR(0, 617, __pyx_L1_error)); - /* "(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":618 + * + * def __rand__(self, other): + * return And(other, self) # <<<<<<<<<<<<<< + * + * def filter(self, *args, **kwargs): */ - __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(618,0,__PYX_ERR(0, 618, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __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; + __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, 618, __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":617 + * return Or(other, self) + * + * def __rand__(self, other): # <<<<<<<<<<<<<< + * return And(other, self) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __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); + __Pyx_TraceReturn(__pyx_r, 0); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "hunter/_predicates.pyx":620 + * return And(other, self) + * + * def filter(self, *args, **kwargs): # <<<<<<<<<<<<<< + * from hunter import _merge + * + */ + +/* Python wrapper */ +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("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_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; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("filter", 0); + __Pyx_TraceCall("filter", __pyx_f[0], 620, 0, __PYX_ERR(0, 620, __pyx_L1_error)); + __Pyx_INCREF(__pyx_v_args); - /* "(tree fragment)":6 - * cdef bint use_setstate - * state = (self.predicates,) - * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< - * if _dict is not None: - * state += (_dict,) + /* "hunter/_predicates.pyx":621 + * + * def filter(self, *args, **kwargs): + * from hunter import _merge # <<<<<<<<<<<<<< + * + * if self.filter is not None: */ - __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_TraceLine(621,0,__PYX_ERR(0, 621, __pyx_L1_error)) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_v__dict = __pyx_t_1; - __pyx_t_1 = 0; + __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, 621, __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, 621, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __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":623 + * 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(623,0,__PYX_ERR(0, 623, __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, 623, __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":624 + * + * 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(624,0,__PYX_ERR(0, 624, __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, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __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_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, 624, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __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.predicates is not None - */ - __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) - __pyx_v_use_setstate = 1; + __Pyx_DECREF_SET(__pyx_v_args, ((PyObject*)__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":623 + * from hunter import _merge + * + * if self.filter is not None: # <<<<<<<<<<<<<< + * args = (self.filter,) + args + * */ - goto __pyx_L3; } - /* "(tree fragment)":11 - * use_setstate = True - * else: - * use_setstate = self.predicates is not None # <<<<<<<<<<<<<< - * if use_setstate: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state + /* "hunter/_predicates.pyx":626 + * args = (self.filter,) + args + * + * return Backlog( # <<<<<<<<<<<<<< + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, */ - __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_L3:; + __Pyx_TraceLine(626,0,__PYX_ERR(0, 626, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); - /* "(tree fragment)":12 - * else: - * use_setstate = self.predicates is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state - * else: + /* "hunter/_predicates.pyx":627 + * + * return Backlog( + * self.condition, # <<<<<<<<<<<<<< + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, + * filter=_merge(*args, **kwargs) */ - __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_use_setstate != 0); - if (__pyx_t_3) { + __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error)) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __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); - /* "(tree fragment)":13 - * use_setstate = self.predicates is not None - * if use_setstate: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state # <<<<<<<<<<<<<< - * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) + /* "hunter/_predicates.pyx":628 + * return Backlog( + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, # <<<<<<<<<<<<<< + * filter=_merge(*args, **kwargs) + * ) */ - __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_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_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); - __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; + __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __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, 628, __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, 628, __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, 628, __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, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vars, __pyx_t_5) < 0) __PYX_ERR(0, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_action, __pyx_v_self->action) < 0) __PYX_ERR(0, 628, __pyx_L1_error) - /* "(tree fragment)":12 - * else: - * use_setstate = self.predicates is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state - * else: + /* "hunter/_predicates.pyx":629 + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, + * filter=_merge(*args, **kwargs) # <<<<<<<<<<<<<< + * ) + * */ - } + __Pyx_TraceLine(629,0,__PYX_ERR(0, 629, __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, 629, __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, 628, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "(tree fragment)":15 - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, None), state - * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * __pyx_unpickle_Or__set_state(self, __pyx_state) + /* "hunter/_predicates.pyx":626 + * args = (self.filter,) + args + * + * return Backlog( # <<<<<<<<<<<<<< + * self.condition, + * size=self.size, stack=self.stack, vars=self.vars, action=self.action, */ - __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_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_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); - __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 + __Pyx_TraceLine(626,0,__PYX_ERR(0, 626, __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, 626, __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":620 + * 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_4); + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Or.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.filter", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_state); - __Pyx_XDECREF(__pyx_v__dict); + __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)":16 - * else: - * return __pyx_unpickle_Or, (type(self), 0xaa8cbda, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Or__set_state(self, __pyx_state) +/* "hunter/_predicates.pxd":54 + * cdef class Backlog: + * cdef: + * readonly object condition # <<<<<<<<<<<<<< + * readonly int size + * readonly int stack */ /* 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_7Backlog_9condition_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_9condition_1__get__(PyObject *__pyx_v_self) { 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_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_9condition___get__(((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_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_7Backlog_9condition___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __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_Or, (type(self), 0xaa8cbda, state) - * def __setstate_cython__(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_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_Or, (type(self), 0xaa8cbda, state) - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * __pyx_unpickle_Or__set_state(self, __pyx_state) - */ + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 54, 0, __PYX_ERR(1, 54, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->condition); + __pyx_r = __pyx_v_self->condition; + goto __pyx_L0; /* 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.Or.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.condition.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -18483,275 +18473,128 @@ static PyObject *__pyx_pf_6hunter_11_predicates_2Or_20__setstate_cython__(struct return __pyx_r; } -/* "hunter/_predicates.pyx":630 - * return Not(self) - * - * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< - * for predicate in self.predicates: - * if fast_call(predicate, event): +/* "hunter/_predicates.pxd":55 + * cdef: + * readonly object condition + * readonly int size # <<<<<<<<<<<<<< + * readonly int stack + * readonly bint vars */ -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; +/* Python wrapper */ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4size_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4size___get__(((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_4size___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { 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; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fast_Or_call", 0); - __Pyx_TraceCall("fast_Or_call", __pyx_f[0], 630, 0, __PYX_ERR(0, 630, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":631 - * - * cdef inline fast_Or_call(Or self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if fast_call(predicate, event): - * return True - */ - __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) - if (unlikely(__pyx_v_self->predicates == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 631, __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, 631, __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, 631, __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":632 - * cdef inline fast_Or_call(Or self, Event event): - * for predicate in self.predicates: - * if fast_call(predicate, event): # <<<<<<<<<<<<<< - * return True - * else: - */ - __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __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, 632, __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, 632, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { - - /* "hunter/_predicates.pyx":633 - * for predicate in self.predicates: - * if fast_call(predicate, event): - * return True # <<<<<<<<<<<<<< - * else: - * return False - */ - __Pyx_TraceLine(633,0,__PYX_ERR(0, 633, __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":632 - * 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":631 - * - * cdef inline fast_Or_call(Or self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if fast_call(predicate, event): - * return True - */ - __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) - } - /*else*/ { - - /* "hunter/_predicates.pyx":635 - * return True - * else: - * return False # <<<<<<<<<<<<<< - * - * - */ - __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __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":631 - * - * cdef inline fast_Or_call(Or self, Event event): - * for predicate in self.predicates: # <<<<<<<<<<<<<< - * if fast_call(predicate, event): - * return True - */ - __Pyx_TraceLine(631,0,__PYX_ERR(0, 631, __pyx_L1_error)) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "hunter/_predicates.pyx":630 - * return Not(self) - * - * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< - * for predicate in self.predicates: - * if fast_call(predicate, event): - */ + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 55, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("hunter._predicates.fast_Or_call", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; + __Pyx_AddTraceback("hunter._predicates.Backlog.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_predicate); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":642 - * `Not` predicate. - * """ - * def __init__(self, predicate): # <<<<<<<<<<<<<< - * self.predicate = predicate - * +/* "hunter/_predicates.pxd":56 + * readonly object condition + * readonly int size + * readonly int stack # <<<<<<<<<<<<<< + * readonly bint vars + * readonly bint strip */ /* 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_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 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, 642, __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, 642, __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); +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5stack_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* 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; +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5stack___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[0], 642, 0, __PYX_ERR(0, 642, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":643 - * """ - * def __init__(self, predicate): - * self.predicate = predicate # <<<<<<<<<<<<<< - * - * def __str__(self): - */ - __Pyx_TraceLine(643,0,__PYX_ERR(0, 643, __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":642 - * `Not` predicate. - * """ - * def __init__(self, predicate): # <<<<<<<<<<<<<< - * self.predicate = predicate - * - */ + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 56, 0, __PYX_ERR(1, 56, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; /* 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_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.stack.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - __Pyx_TraceReturn(Py_None, 0); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":645 - * self.predicate = predicate - * - * def __str__(self): # <<<<<<<<<<<<<< - * return 'Not(%s)' % self.predicate - * +/* "hunter/_predicates.pxd":57 + * readonly int size + * readonly int stack + * readonly bint vars # <<<<<<<<<<<<<< + * readonly bint strip + * readonly object action */ /* 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_7Backlog_4vars_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_4vars_1__get__(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_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(((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_3Not_2__str__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_4vars___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -18759,36 +18602,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__str__", 0); - __Pyx_TraceCall("__str__", __pyx_f[0], 645, 0, __PYX_ERR(0, 645, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":646 - * - * def __str__(self): - * return 'Not(%s)' % self.predicate # <<<<<<<<<<<<<< - * - * def __repr__(self): - */ - __Pyx_TraceLine(646,0,__PYX_ERR(0, 646, __pyx_L1_error)) + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 57, 0, __PYX_ERR(1, 57, __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, 646, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":645 - * 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_AddTraceback("hunter._predicates.Backlog.vars.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -18797,28 +18623,28 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_2__str__(struct __pyx_obj_6 return __pyx_r; } -/* "hunter/_predicates.pyx":648 - * return 'Not(%s)' % self.predicate - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return '' % self.predicate - * +/* "hunter/_predicates.pxd":58 + * readonly int stack + * readonly bint vars + * readonly bint strip # <<<<<<<<<<<<<< + * readonly object action + * readonly object _filter */ /* 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_7Backlog_5strip_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5strip_1__get__(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_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(((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_3Not_4__repr__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5strip___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -18826,36 +18652,19 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__repr__", 0); - __Pyx_TraceCall("__repr__", __pyx_f[0], 648, 0, __PYX_ERR(0, 648, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":649 - * - * def __repr__(self): - * return '' % self.predicate # <<<<<<<<<<<<<< - * - * def __eq__(self, other): - */ - __Pyx_TraceLine(649,0,__PYX_ERR(0, 649, __pyx_L1_error)) + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 58, 0, __PYX_ERR(1, 58, __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, 649, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":648 - * 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_AddTraceback("hunter._predicates.Backlog.strip.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -18864,98 +18673,44 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_4__repr__(struct __pyx_obj_ return __pyx_r; } -/* "hunter/_predicates.pyx":651 - * return '' % self.predicate - * - * def __eq__(self, other): # <<<<<<<<<<<<<< - * return ( - * isinstance(other, Not) +/* "hunter/_predicates.pxd":59 + * readonly bint vars + * readonly bint strip + * readonly object action # <<<<<<<<<<<<<< + * readonly object _filter + * readonly object queue */ /* 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_7Backlog_6action_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_6action_1__get__(PyObject *__pyx_v_self) { 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_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(((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_3Not_6__eq__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self, PyObject *__pyx_v_other) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_6action___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__eq__", 0); - __Pyx_TraceCall("__eq__", __pyx_f[0], 651, 0, __PYX_ERR(0, 651, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":652 - * - * def __eq__(self, other): - * return ( # <<<<<<<<<<<<<< - * isinstance(other, Not) - * and self.predicate == ( other).predicate - */ - __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error)) + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __pyx_L1_error)); __Pyx_XDECREF(__pyx_r); - - /* "hunter/_predicates.pyx":653 - * def __eq__(self, other): - * return ( - * isinstance(other, Not) # <<<<<<<<<<<<<< - * and self.predicate == ( other).predicate - * ) - */ - __Pyx_TraceLine(653,0,__PYX_ERR(0, 653, __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, 653, __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":654 - * return ( - * isinstance(other, Not) - * and self.predicate == ( other).predicate # <<<<<<<<<<<<<< - * ) - * - */ - __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __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, 654, __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; + __Pyx_INCREF(__pyx_v_self->action); + __pyx_r = __pyx_v_self->action; goto __pyx_L0; - /* "hunter/_predicates.pyx":651 - * 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_AddTraceback("hunter._predicates.Backlog.action.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -18964,184 +18719,90 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_6__eq__(struct __pyx_obj_6h return __pyx_r; } -/* "hunter/_predicates.pyx":657 - * ) - * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Not', self.predicate)) +/* "hunter/_predicates.pxd":60 + * readonly bint strip + * readonly object action + * readonly object _filter # <<<<<<<<<<<<<< + * readonly object queue * */ /* 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; +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_7_filter_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; __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_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(((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_3Not_8__hash__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { - Py_hash_t __pyx_r; +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_7_filter___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { + PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - Py_hash_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__hash__", 0); - __Pyx_TraceCall("__hash__", __pyx_f[0], 657, 0, __PYX_ERR(0, 657, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":658 - * - * def __hash__(self): - * return hash(('Not', self.predicate)) # <<<<<<<<<<<<<< - * - * def __call__(self, Event event): - */ - __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error)) - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __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, 658, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; - goto __pyx_L0; - - /* "hunter/_predicates.pyx":657 - * ) - * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(('Not', self.predicate)) - * - */ + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 60, 0, __PYX_ERR(1, 60, __pyx_L1_error)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_r = __pyx_v_self->_filter; + goto __pyx_L0; /* 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_AddTraceback("hunter._predicates.Backlog._filter.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; __pyx_L0:; - if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2; - __Pyx_TraceReturn(Py_None, 0); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "hunter/_predicates.pyx":660 - * return hash(('Not', self.predicate)) - * - * def __call__(self, Event event): # <<<<<<<<<<<<<< - * return fast_Not_call(self, event) +/* "hunter/_predicates.pxd":61 + * readonly object action + * readonly object _filter + * readonly object queue # <<<<<<<<<<<<<< * + * cdef fast_And_call(And self, Event 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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_6hunter_11_predicates_7Backlog_5queue_1__get__(PyObject *__pyx_v_self) { 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, 660, __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, 660, __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, 660, __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); + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(((struct __pyx_obj_6hunter_11_predicates_Backlog *)__pyx_v_self)); /* 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) { +static PyObject *__pyx_pf_6hunter_11_predicates_7Backlog_5queue___get__(struct __pyx_obj_6hunter_11_predicates_Backlog *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__call__", 0); - __Pyx_TraceCall("__call__", __pyx_f[0], 660, 0, __PYX_ERR(0, 660, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":661 - * - * def __call__(self, Event event): - * return fast_Not_call(self, event) # <<<<<<<<<<<<<< - * - * def __or__(self, other): - */ - __Pyx_TraceLine(661,0,__PYX_ERR(0, 661, __pyx_L1_error)) + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_TraceCall("__get__", __pyx_f[1], 61, 0, __PYX_ERR(1, 61, __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, 661, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_INCREF(__pyx_v_self->queue); + __pyx_r = __pyx_v_self->queue; goto __pyx_L0; - /* "hunter/_predicates.pyx":660 - * 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_AddTraceback("hunter._predicates.Backlog.queue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -19150,341 +18811,365 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_10__call__(struct __pyx_obj return __pyx_r; } -/* "hunter/_predicates.pyx":663 - * 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)) +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ /* 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_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("__or__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_12__or__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + __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_3Not_12__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { +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 - int __pyx_t_1; - int __pyx_t_2; - int __pyx_t_3; + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__or__", 0); - __Pyx_TraceCall("__or__", __pyx_f[0], 663, 0, __PYX_ERR(0, 663, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); - /* "hunter/_predicates.pyx":664 - * - * def __or__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(And(( self).predicate, ( other).predicate)) - * else: + /* "(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(664,0,__PYX_ERR(0, 664, __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(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 = __Pyx_PyBool_FromLong(__pyx_v_self->strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_self->vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_self->_filter); + __Pyx_GIVEREF(__pyx_v_self->_filter); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self->_filter); + __Pyx_INCREF(__pyx_v_self->action); + __Pyx_GIVEREF(__pyx_v_self->action); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->action); + __Pyx_INCREF(__pyx_v_self->condition); + __Pyx_GIVEREF(__pyx_v_self->condition); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_self->condition); + __Pyx_INCREF(__pyx_v_self->queue); + __Pyx_GIVEREF(__pyx_v_self->queue); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_self->queue); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 7, __pyx_t_4); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_v_state = ((PyObject*)__pyx_t_5); + __pyx_t_5 = 0; - /* "hunter/_predicates.pyx":665 - * 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) + /* "(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(665,0,__PYX_ERR(0, 665, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 665, __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, 665, __pyx_L1_error) + __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) + __pyx_t_5 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v__dict = __pyx_t_5; + __pyx_t_5 = 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_6 = (__pyx_v__dict != Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { + + /* "(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_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 8, __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, 665, __pyx_L1_error) + __Pyx_INCREF(__pyx_v__dict); + __Pyx_GIVEREF(__pyx_v__dict); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v__dict); + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; + __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - goto __pyx_L0; - /* "hunter/_predicates.pyx":664 - * - * def __or__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(And(( self).predicate, ( other).predicate)) - * else: + /* "(tree fragment)":9 + * if _dict is not None: + * state += (_dict,) + * use_setstate = True # <<<<<<<<<<<<<< + * else: + * 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 + */ + __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) + __pyx_v_use_setstate = 1; + + /* "(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 */ + goto __pyx_L3; } - /* "hunter/_predicates.pyx":667 - * return Not(And(( self).predicate, ( other).predicate)) - * else: - * return Or(self, other) # <<<<<<<<<<<<<< - * - * def __and__(self, other): + /* "(tree fragment)":11 + * use_setstate = True + * else: + * 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 # <<<<<<<<<<<<<< + * if use_setstate: + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state */ - __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error)) + __Pyx_TraceLine(11,0,__PYX_ERR(2, 11, __pyx_L1_error)) /*else*/ { - __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(__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, 667, __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_t_6 = (__pyx_v_self->_filter != Py_None); + __pyx_t_8 = (__pyx_t_6 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->action != Py_None); + __pyx_t_6 = (__pyx_t_8 != 0); + if (!__pyx_t_6) { + } else { + __pyx_t_7 = __pyx_t_6; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_6 = (__pyx_v_self->condition != Py_None); + __pyx_t_8 = (__pyx_t_6 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_7 = __pyx_t_8; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_8 = (__pyx_v_self->queue != Py_None); + __pyx_t_6 = (__pyx_t_8 != 0); + __pyx_t_7 = __pyx_t_6; + __pyx_L4_bool_binop_done:; + __pyx_v_use_setstate = __pyx_t_7; } + __pyx_L3:; - /* "hunter/_predicates.pyx":663 - * 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":669 - * 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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__and__", 0); - __Pyx_TraceCall("__and__", __pyx_f[0], 669, 0, __PYX_ERR(0, 669, __pyx_L1_error)); - - /* "hunter/_predicates.pyx":670 - * - * def __and__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(Or(( self).predicate, ( other).predicate)) - * else: + /* "(tree fragment)":12 + * else: + * 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 + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state + * else: */ - __Pyx_TraceLine(670,0,__PYX_ERR(0, 670, __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(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) + __pyx_t_7 = (__pyx_v_use_setstate != 0); + if (__pyx_t_7) { - /* "hunter/_predicates.pyx":671 - * 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) + /* "(tree fragment)":13 + * 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 + * if use_setstate: + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state # <<<<<<<<<<<<<< + * else: + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) */ - __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error)) + __Pyx_TraceLine(13,0,__PYX_ERR(2, 13, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 671, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __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, 671, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __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, 671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_61357180); + __Pyx_GIVEREF(__pyx_int_61357180); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_61357180); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + PyTuple_SET_ITEM(__pyx_t_5, 2, Py_None); + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state); __pyx_t_4 = 0; + __pyx_t_5 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "hunter/_predicates.pyx":670 - * - * def __and__(self, other): - * if type(self) is Not and type(other) is Not: # <<<<<<<<<<<<<< - * return Not(Or(( self).predicate, ( other).predicate)) - * else: + /* "(tree fragment)":12 + * else: + * 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 + * if use_setstate: # <<<<<<<<<<<<<< + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state + * else: */ } - /* "hunter/_predicates.pyx":673 - * return Not(Or(( self).predicate, ( other).predicate)) - * else: - * return And(self, other) # <<<<<<<<<<<<<< - * - * def __invert__(self): + /* "(tree fragment)":15 + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, None), state + * else: + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) */ - __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error)) + __Pyx_TraceLine(15,0,__PYX_ERR(2, 15, __pyx_L1_error)) /*else*/ { __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(__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, 673, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Backlog); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; + __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); + __Pyx_INCREF(__pyx_int_61357180); + __Pyx_GIVEREF(__pyx_int_61357180); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_61357180); + __Pyx_INCREF(__pyx_v_state); + __Pyx_GIVEREF(__pyx_v_state); + PyTuple_SET_ITEM(__pyx_t_5, 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_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); + __pyx_t_3 = 0; __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; goto __pyx_L0; } - /* "hunter/_predicates.pyx":669 - * 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)) + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * cdef tuple state + * cdef object _dict */ /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.Not.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.Backlog.__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; } -/* "hunter/_predicates.pyx":675 - * return And(self, other) - * - * def __invert__(self): # <<<<<<<<<<<<<< - * return self.predicate - * +/* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) */ /* 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_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("__invert__ (wrapper)", 0); - __pyx_r = __pyx_pf_6hunter_11_predicates_3Not_16__invert__(((struct __pyx_obj_6hunter_11_predicates_Not *)__pyx_v_self)); + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __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_3Not_16__invert__(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v_self) { +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 + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__invert__", 0); - __Pyx_TraceCall("__invert__", __pyx_f[0], 675, 0, __PYX_ERR(0, 675, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); - /* "hunter/_predicates.pyx":676 - * - * def __invert__(self): - * return self.predicate # <<<<<<<<<<<<<< - * - * cdef inline fast_Not_call(Not self, Event event): + /* "(tree fragment)":17 + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) + * def __setstate_cython__(self, __pyx_state): + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - __Pyx_TraceLine(676,0,__PYX_ERR(0, 676, __pyx_L1_error)) - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->predicate); - __pyx_r = __pyx_v_self->predicate; - goto __pyx_L0; + __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_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; - /* "hunter/_predicates.pyx":675 - * return And(self, other) - * - * def __invert__(self): # <<<<<<<<<<<<<< - * return self.predicate - * + /* "(tree fragment)":16 + * else: + * return __pyx_unpickle_Backlog, (type(self), 0x3a83c7c, state) + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * __pyx_unpickle_Backlog__set_state(self, __pyx_state) */ /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("hunter._predicates.Not.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("hunter._predicates.Backlog.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -19493,745 +19178,1060 @@ static PyObject *__pyx_pf_6hunter_11_predicates_3Not_16__invert__(struct __pyx_o return __pyx_r; } -/* "hunter/_predicates.pxd":34 - * cdef class Not: - * cdef: - * readonly object predicate # <<<<<<<<<<<<<< +/* "hunter/_predicates.pyx":632 + * ) * - * @cython.final + * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< + * cdef bint first_is_call + * cdef Event detached_event */ -/* 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) { +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) { + int __pyx_v_first_is_call; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_detached_event = 0; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_first_event = 0; + struct __pyx_obj_6hunter_6_event_Event *__pyx_v_stack_event = 0; + PyFrameObject *__pyx_v_first_frame = 0; + PyFrameObject *__pyx_v_frame = 0; + int __pyx_v_backlog_call_depth; + int __pyx_v_depth_delta; + int __pyx_v_first_depth; + int __pyx_v_missing_depth; + PyObject *__pyx_v_result = 0; + PyObject *__pyx_v_stack_events = 0; + PyObject *__pyx_v_backlog_event = NULL; PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + long __pyx_t_6; + long __pyx_t_7; + int __pyx_t_8; + int __pyx_t_9; + Py_ssize_t __pyx_t_10; + PyObject *(*__pyx_t_11)(PyObject *); + PyObject *__pyx_t_12 = NULL; + struct __pyx_opt_args_6hunter_6_event_5Event_detach __pyx_t_13; + int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __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; -} + __Pyx_RefNannySetupContext("fast_Backlog_call", 0); + __Pyx_TraceCall("fast_Backlog_call", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error)); -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict + /* "hunter/_predicates.pyx":646 + * cdef object stack_events + * + * result = fast_call(self.condition, event) # <<<<<<<<<<<<<< + * if result: + * if self.queue: */ + __Pyx_TraceLine(646,0,__PYX_ERR(0, 646, __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, 646, __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; -/* 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)); + /* "hunter/_predicates.pyx":647 + * + * result = fast_call(self.condition, event) + * if result: # <<<<<<<<<<<<<< + * if self.queue: + * self.action.cleanup() + */ + __Pyx_TraceLine(647,0,__PYX_ERR(0, 647, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 647, __pyx_L1_error) + if (__pyx_t_3) { - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "hunter/_predicates.pyx":648 + * result = fast_call(self.condition, event) + * if result: + * if self.queue: # <<<<<<<<<<<<<< + * self.action.cleanup() + * + */ + __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __pyx_L1_error)) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->queue); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 648, __pyx_L1_error) + if (__pyx_t_3) { -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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); + /* "hunter/_predicates.pyx":649 + * if result: + * if self.queue: + * self.action.cleanup() # <<<<<<<<<<<<<< + * + * first_event = self.queue[0] + */ + __Pyx_TraceLine(649,0,__PYX_ERR(0, 649, __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, 649, __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, 649, __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; - /* "(tree fragment)":5 - * cdef object _dict - * cdef bint use_setstate - * state = (self.predicate,) # <<<<<<<<<<<<<< - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: + /* "hunter/_predicates.pyx":651 + * self.action.cleanup() + * + * first_event = self.queue[0] # <<<<<<<<<<<<<< + * first_depth = first_event.depth + * backlog_call_depth = event.depth - first_depth */ - __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; + __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __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, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __pyx_t_2; + __Pyx_INCREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_first_event = ((struct __pyx_obj_6hunter_6_event_Event *)__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,) + /* "hunter/_predicates.pyx":652 + * + * first_event = self.queue[0] + * first_depth = first_event.depth # <<<<<<<<<<<<<< + * backlog_call_depth = event.depth - first_depth + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid */ - __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; + __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error)) + __pyx_t_5 = __pyx_v_first_event->depth; + __pyx_v_first_depth = __pyx_t_5; - /* "(tree fragment)":7 - * state = (self.predicate,) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "hunter/_predicates.pyx":653 + * first_event = self.queue[0] + * first_depth = first_event.depth + * backlog_call_depth = event.depth - first_depth # <<<<<<<<<<<<<< + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) */ - __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(653,0,__PYX_ERR(0, 653, __pyx_L1_error)) + __pyx_v_backlog_call_depth = (__pyx_v_event->depth - __pyx_v_first_depth); - /* "(tree fragment)":8 - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: - * state += (_dict,) # <<<<<<<<<<<<<< - * use_setstate = True - * else: + /* "hunter/_predicates.pyx":654 + * first_depth = first_event.depth + * backlog_call_depth = event.depth - first_depth + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid # <<<<<<<<<<<<<< + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: */ - __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; + __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __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, 654, __pyx_L1_error) + __pyx_v_first_is_call = __pyx_t_3; - /* "(tree fragment)":9 - * if _dict is not None: - * state += (_dict,) - * use_setstate = True # <<<<<<<<<<<<<< - * else: - * use_setstate = self.predicate is not None + /* "hunter/_predicates.pyx":655 + * backlog_call_depth = event.depth - first_depth + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) # <<<<<<<<<<<<<< + * if missing_depth: + * if first_is_call and first_event.frame is not None: */ - __Pyx_TraceLine(9,0,__PYX_ERR(2, 9, __pyx_L1_error)) - __pyx_v_use_setstate = 1; + __Pyx_TraceLine(655,0,__PYX_ERR(0, 655, __pyx_L1_error)) + __pyx_t_5 = ((__pyx_v_self->stack - __pyx_v_backlog_call_depth) + __pyx_v_first_is_call); + __pyx_t_6 = 0; + if (((__pyx_t_5 > __pyx_t_6) != 0)) { + __pyx_t_7 = __pyx_t_5; + } else { + __pyx_t_7 = __pyx_t_6; + } + __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_v_first_depth; + if (((__pyx_t_6 < __pyx_t_5) != 0)) { + __pyx_t_7 = __pyx_t_6; + } else { + __pyx_t_7 = __pyx_t_5; + } + __pyx_v_missing_depth = __pyx_t_7; - /* "(tree fragment)":7 - * state = (self.predicate,) - * _dict = getattr(self, '__dict__', None) - * if _dict is not None: # <<<<<<<<<<<<<< - * state += (_dict,) - * use_setstate = True + /* "hunter/_predicates.pyx":656 + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: # <<<<<<<<<<<<<< + * if first_is_call and first_event.frame is not None: + * first_frame = first_event.frame.f_back */ - goto __pyx_L3; - } + __Pyx_TraceLine(656,0,__PYX_ERR(0, 656, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_missing_depth != 0); + if (__pyx_t_3) { - /* "(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 + /* "hunter/_predicates.pyx":657 + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: + * if first_is_call and first_event.frame is not None: # <<<<<<<<<<<<<< + * first_frame = first_event.frame.f_back + * else: */ - __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:; + __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error)) + __pyx_t_8 = (__pyx_v_first_is_call != 0); + if (__pyx_t_8) { + } else { + __pyx_t_3 = __pyx_t_8; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_8 = (((PyObject *)__pyx_v_first_event->frame) != Py_None); + __pyx_t_9 = (__pyx_t_8 != 0); + __pyx_t_3 = __pyx_t_9; + __pyx_L7_bool_binop_done:; + if (__pyx_t_3) { - /* "(tree fragment)":12 - * else: - * use_setstate = self.predicate is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state - * else: + /* "hunter/_predicates.pyx":658 + * if missing_depth: + * if first_is_call and first_event.frame is not None: + * first_frame = first_event.frame.f_back # <<<<<<<<<<<<<< + * else: + * first_frame = first_event.frame */ - __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) - __pyx_t_3 = (__pyx_v_use_setstate != 0); - if (__pyx_t_3) { + __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_first_event->frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __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, 658, __pyx_L1_error) + __pyx_v_first_frame = ((PyFrameObject *)__pyx_t_1); + __pyx_t_1 = 0; - /* "(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) + /* "hunter/_predicates.pyx":657 + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: + * if first_is_call and first_event.frame is not None: # <<<<<<<<<<<<<< + * first_frame = first_event.frame.f_back + * else: */ - __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; + goto __pyx_L6; + } - /* "(tree fragment)":12 - * else: - * use_setstate = self.predicate is not None - * if use_setstate: # <<<<<<<<<<<<<< - * return __pyx_unpickle_Not, (type(self), 0xf670ef6, None), state - * else: + /* "hunter/_predicates.pyx":660 + * first_frame = first_event.frame.f_back + * else: + * first_frame = first_event.frame # <<<<<<<<<<<<<< + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full */ - } + __Pyx_TraceLine(660,0,__PYX_ERR(0, 660, __pyx_L1_error)) + /*else*/ { + __pyx_t_1 = ((PyObject *)__pyx_v_first_event->frame); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_first_frame = ((PyFrameObject *)__pyx_t_1); + __pyx_t_1 = 0; + } + __pyx_L6:; - /* "(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) + /* "hunter/_predicates.pyx":661 + * else: + * first_frame = first_event.frame + * if first_frame is not None: # <<<<<<<<<<<<<< + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame */ - __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; - } + __Pyx_TraceLine(661,0,__PYX_ERR(0, 661, __pyx_L1_error)) + __pyx_t_3 = (((PyObject *)__pyx_v_first_frame) != Py_None); + __pyx_t_9 = (__pyx_t_3 != 0); + if (__pyx_t_9) { - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef tuple state - * cdef object _dict + /* "hunter/_predicates.pyx":662 + * first_frame = first_event.frame + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full # <<<<<<<<<<<<<< + * frame = first_frame + * depth_delta = 0 */ + __Pyx_TraceLine(662,0,__PYX_ERR(0, 662, __pyx_L1_error)) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_deque); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + } + } + __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_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, 662, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_stack_events = __pyx_t_1; + __pyx_t_1 = 0; - /* 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; -} + /* "hunter/_predicates.pyx":663 + * if first_frame is not None: + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame # <<<<<<<<<<<<<< + * depth_delta = 0 + * while frame and depth_delta < missing_depth: + */ + __Pyx_TraceLine(663,0,__PYX_ERR(0, 663, __pyx_L1_error)) + __Pyx_INCREF(((PyObject *)__pyx_v_first_frame)); + __pyx_v_frame = __pyx_v_first_frame; -/* "(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) + /* "hunter/_predicates.pyx":664 + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame + * depth_delta = 0 # <<<<<<<<<<<<<< + * while frame and depth_delta < missing_depth: + * stack_event = Event( */ + __Pyx_TraceLine(664,0,__PYX_ERR(0, 664, __pyx_L1_error)) + __pyx_v_depth_delta = 0; -/* 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)); + /* "hunter/_predicates.pyx":665 + * frame = first_frame + * depth_delta = 0 + * while frame and depth_delta < missing_depth: # <<<<<<<<<<<<<< + * stack_event = Event( + * frame=frame, kind='call', arg=None, + */ + __Pyx_TraceLine(665,0,__PYX_ERR(0, 665, __pyx_L1_error)) + while (1) { + __pyx_t_3 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_frame)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 665, __pyx_L1_error) + if (__pyx_t_3) { + } else { + __pyx_t_9 = __pyx_t_3; + goto __pyx_L12_bool_binop_done; + } + __pyx_t_3 = ((__pyx_v_depth_delta < __pyx_v_missing_depth) != 0); + __pyx_t_9 = __pyx_t_3; + __pyx_L12_bool_binop_done:; + if (!__pyx_t_9) break; - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} + /* "hunter/_predicates.pyx":667 + * while 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(667,0,__PYX_ERR(0, 667, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_frame, ((PyObject *)__pyx_v_frame)) < 0) __PYX_ERR(0, 667, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_kind, __pyx_n_s_call) < 0) __PYX_ERR(0, 667, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_arg, Py_None) < 0) __PYX_ERR(0, 667, __pyx_L1_error) -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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - __Pyx_TraceCall("__setstate_cython__", __pyx_f[2], 16, 0, __PYX_ERR(2, 16, __pyx_L1_error)); + /* "hunter/_predicates.pyx":668 + * stack_event = Event( + * frame=frame, kind='call', arg=None, + * threading_support=event.threading_support, # <<<<<<<<<<<<<< + * depth=first_depth - depth_delta - 1, calls=-1 + * ) + */ + __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_event->threading_support); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_threading_support, __pyx_t_2) < 0) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "(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) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":669 + * 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(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; + __Pyx_TraceLine(669,0,__PYX_ERR(0, 669, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_first_depth - __pyx_v_depth_delta) - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_depth, __pyx_t_2) < 0) __PYX_ERR(0, 667, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_calls, __pyx_int_neg_1) < 0) __PYX_ERR(0, 667, __pyx_L1_error) - /* "(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) + /* "hunter/_predicates.pyx":666 + * depth_delta = 0 + * while frame and depth_delta < missing_depth: + * stack_event = Event( # <<<<<<<<<<<<<< + * frame=frame, kind='call', arg=None, + * threading_support=event.threading_support, */ + __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6hunter_6_event_Event), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_2)); + __pyx_t_2 = 0; - /* 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":671 + * depth=first_depth - depth_delta - 1, calls=-1 + * ) + * if not self.vars: # <<<<<<<<<<<<<< + * # noinspection PyPropertyAccess + * stack_event._locals = {} + */ + __Pyx_TraceLine(671,0,__PYX_ERR(0, 671, __pyx_L1_error)) + __pyx_t_9 = ((!(__pyx_v_self->vars != 0)) != 0); + if (__pyx_t_9) { -/* "hunter/_predicates.pyx":678 - * return self.predicate - * - * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< - * return not fast_call(self.predicate, event) - * + /* "hunter/_predicates.pyx":673 + * if not self.vars: + * # noinspection PyPropertyAccess + * stack_event._locals = {} # <<<<<<<<<<<<<< + * stack_event._globals = {} + * stack_event.detached = True */ + __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_stack_event->_locals); + __Pyx_DECREF(__pyx_v_stack_event->_locals); + __pyx_v_stack_event->_locals = __pyx_t_2; + __pyx_t_2 = 0; -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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fast_Not_call", 0); - __Pyx_TraceCall("fast_Not_call", __pyx_f[0], 678, 0, __PYX_ERR(0, 678, __pyx_L1_error)); + /* "hunter/_predicates.pyx":674 + * # noinspection PyPropertyAccess + * stack_event._locals = {} + * stack_event._globals = {} # <<<<<<<<<<<<<< + * stack_event.detached = True + * stack_events.appendleft(stack_event) + */ + __Pyx_TraceLine(674,0,__PYX_ERR(0, 674, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_v_stack_event->_globals); + __Pyx_DECREF(__pyx_v_stack_event->_globals); + __pyx_v_stack_event->_globals = __pyx_t_2; + __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":679 - * - * cdef inline fast_Not_call(Not self, Event event): - * return not fast_call(self.predicate, event) # <<<<<<<<<<<<<< - * - * + /* "hunter/_predicates.pyx":675 + * stack_event._locals = {} + * stack_event._globals = {} + * stack_event.detached = True # <<<<<<<<<<<<<< + * stack_events.appendleft(stack_event) + * frame = frame.f_back */ - __Pyx_TraceLine(679,0,__PYX_ERR(0, 679, __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, 679, __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, 679, __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, 679, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; + __Pyx_TraceLine(675,0,__PYX_ERR(0, 675, __pyx_L1_error)) + __pyx_v_stack_event->detached = 1; - /* "hunter/_predicates.pyx":678 - * return self.predicate - * - * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< - * return not fast_call(self.predicate, event) - * + /* "hunter/_predicates.pyx":671 + * depth=first_depth - depth_delta - 1, calls=-1 + * ) + * if not self.vars: # <<<<<<<<<<<<<< + * # noinspection PyPropertyAccess + * stack_event._locals = {} */ + } - /* 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":676 + * stack_event._globals = {} + * stack_event.detached = True + * stack_events.appendleft(stack_event) # <<<<<<<<<<<<<< + * frame = frame.f_back + * depth_delta += 1 + */ + __Pyx_TraceLine(676,0,__PYX_ERR(0, 676, __pyx_L1_error)) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stack_events, __pyx_n_s_appendleft); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __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_Call2Args(__pyx_t_1, __pyx_t_4, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __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":682 - * - * - * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< - * if type(callable) is Query: - * return fast_Query_call( callable, event) + /* "hunter/_predicates.pyx":677 + * stack_event.detached = True + * stack_events.appendleft(stack_event) + * frame = frame.f_back # <<<<<<<<<<<<<< + * depth_delta += 1 + * for stack_event in stack_events: */ + __Pyx_TraceLine(677,0,__PYX_ERR(0, 677, __pyx_L1_error)) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_frame), __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __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, 677, __pyx_L1_error) + __Pyx_DECREF_SET(__pyx_v_frame, ((PyFrameObject *)__pyx_t_2)); + __pyx_t_2 = 0; -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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fast_call", 0); - __Pyx_TraceCall("fast_call", __pyx_f[0], 682, 0, __PYX_ERR(0, 682, __pyx_L1_error)); + /* "hunter/_predicates.pyx":678 + * stack_events.appendleft(stack_event) + * frame = frame.f_back + * depth_delta += 1 # <<<<<<<<<<<<<< + * for stack_event in stack_events: + * if self._filter is None or self._filter(stack_event): + */ + __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error)) + __pyx_v_depth_delta = (__pyx_v_depth_delta + 1); + } - /* "hunter/_predicates.pyx":683 - * - * 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":679 + * frame = frame.f_back + * depth_delta += 1 + * for stack_event in stack_events: # <<<<<<<<<<<<<< + * if self._filter is None or self._filter(stack_event): + * self.action(stack_event) */ - __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __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) { + __Pyx_TraceLine(679,0,__PYX_ERR(0, 679, __pyx_L1_error)) + if (likely(PyList_CheckExact(__pyx_v_stack_events)) || PyTuple_CheckExact(__pyx_v_stack_events)) { + __pyx_t_2 = __pyx_v_stack_events; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; + __pyx_t_11 = NULL; + } else { + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_stack_events); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 679, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_11)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 679, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_11(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 679, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6hunter_6_event_Event))))) __PYX_ERR(0, 679, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_stack_event, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_1)); + __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":684 - * 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) + /* "hunter/_predicates.pyx":680 + * depth_delta += 1 + * for stack_event in stack_events: + * if self._filter is None or self._filter(stack_event): # <<<<<<<<<<<<<< + * self.action(stack_event) + * for backlog_event in self.queue: */ - __Pyx_TraceLine(684,0,__PYX_ERR(0, 684, __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, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __Pyx_TraceLine(680,0,__PYX_ERR(0, 680, __pyx_L1_error)) + __pyx_t_3 = (__pyx_v_self->_filter == Py_None); + __pyx_t_8 = (__pyx_t_3 != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_9 = __pyx_t_8; + goto __pyx_L18_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 680, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_9 = __pyx_t_8; + __pyx_L18_bool_binop_done:; + if (__pyx_t_9) { - /* "hunter/_predicates.pyx":683 - * - * 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":681 + * for stack_event in stack_events: + * if self._filter is None or self._filter(stack_event): + * self.action(stack_event) # <<<<<<<<<<<<<< + * for backlog_event in self.queue: + * if self._filter is None: */ - } + __Pyx_TraceLine(681,0,__PYX_ERR(0, 681, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, ((PyObject *)__pyx_v_stack_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_stack_event)); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":685 - * 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":680 + * depth_delta += 1 + * for stack_event in stack_events: + * if self._filter is None or self._filter(stack_event): # <<<<<<<<<<<<<< + * self.action(stack_event) + * for backlog_event in self.queue: */ - __Pyx_TraceLine(685,0,__PYX_ERR(0, 685, __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":686 - * 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":679 + * frame = frame.f_back + * depth_delta += 1 + * for stack_event in stack_events: # <<<<<<<<<<<<<< + * if self._filter is None or self._filter(stack_event): + * self.action(stack_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_Or_call(((struct __pyx_obj_6hunter_11_predicates_Or *)__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; + __Pyx_TraceLine(679,0,__PYX_ERR(0, 679, __pyx_L1_error)) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":685 - * 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":661 + * else: + * first_frame = first_event.frame + * if first_frame is not None: # <<<<<<<<<<<<<< + * stack_events = deque() # a new deque because self.queue is limited, we can't add while it's full + * frame = first_frame */ - } + } - /* "hunter/_predicates.pyx":687 - * 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":656 + * first_is_call = first_event.kind == 'call' # note that True is 1, thus the following math is valid + * missing_depth = min(first_depth, max(0, self.stack - backlog_call_depth + first_is_call)) + * if missing_depth: # <<<<<<<<<<<<<< + * if first_is_call and first_event.frame is not None: + * first_frame = first_event.frame.f_back */ - __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __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":688 - * 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) + /* "hunter/_predicates.pyx":682 + * if self._filter is None or 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(688,0,__PYX_ERR(0, 688, __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, 688, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __Pyx_TraceLine(682,0,__PYX_ERR(0, 682, __pyx_L1_error)) + if (likely(PyList_CheckExact(__pyx_v_self->queue)) || PyTuple_CheckExact(__pyx_v_self->queue)) { + __pyx_t_2 = __pyx_v_self->queue; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; + __pyx_t_11 = NULL; + } else { + __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->queue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 682, __pyx_L1_error) + } + for (;;) { + if (likely(!__pyx_t_11)) { + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } else { + if (__pyx_t_10 >= 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_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 682, __pyx_L1_error) + #else + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + #endif + } + } else { + __pyx_t_1 = __pyx_t_11(__pyx_t_2); + if (unlikely(!__pyx_t_1)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + else __PYX_ERR(0, 682, __pyx_L1_error) + } + break; + } + __Pyx_GOTREF(__pyx_t_1); + } + __Pyx_XDECREF_SET(__pyx_v_backlog_event, __pyx_t_1); + __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":687 - * 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":683 + * self.action(stack_event) + * for backlog_event in self.queue: + * if self._filter is None: # <<<<<<<<<<<<<< + * self.action(backlog_event) + * elif fast_call(self._filter, backlog_event): */ - } + __Pyx_TraceLine(683,0,__PYX_ERR(0, 683, __pyx_L1_error)) + __pyx_t_9 = (__pyx_v_self->_filter == Py_None); + __pyx_t_8 = (__pyx_t_9 != 0); + if (__pyx_t_8) { - /* "hunter/_predicates.pyx":689 - * 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":684 + * for backlog_event in self.queue: + * if self._filter is None: + * self.action(backlog_event) # <<<<<<<<<<<<<< + * elif fast_call(self._filter, backlog_event): + * self.action(backlog_event) */ - __Pyx_TraceLine(689,0,__PYX_ERR(0, 689, __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(684,0,__PYX_ERR(0, 684, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_4 = __pyx_v_self->action; __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "hunter/_predicates.pyx":690 - * 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) + /* "hunter/_predicates.pyx":683 + * self.action(stack_event) + * for backlog_event in self.queue: + * if self._filter is None: # <<<<<<<<<<<<<< + * self.action(backlog_event) + * elif fast_call(self._filter, backlog_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_Not_call(((struct __pyx_obj_6hunter_11_predicates_Not *)__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; + goto __pyx_L22; + } - /* "hunter/_predicates.pyx":689 - * 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":685 + * if self._filter is None: + * self.action(backlog_event) + * elif fast_call(self._filter, backlog_event): # <<<<<<<<<<<<<< + * self.action(backlog_event) + * self.queue.clear() */ - } + __Pyx_TraceLine(685,0,__PYX_ERR(0, 685, __pyx_L1_error)) + __pyx_t_1 = __pyx_v_self->_filter; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_f_6hunter_11_predicates_fast_call(__pyx_t_1, ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_v_backlog_event)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_8) { - /* "hunter/_predicates.pyx":691 - * 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":686 + * self.action(backlog_event) + * elif fast_call(self._filter, backlog_event): + * self.action(backlog_event) # <<<<<<<<<<<<<< + * self.queue.clear() + * else: */ - __Pyx_TraceLine(691,0,__PYX_ERR(0, 691, __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":692 - * 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(686,0,__PYX_ERR(0, 686, __pyx_L1_error)) + __Pyx_INCREF(__pyx_v_self->action); + __pyx_t_1 = __pyx_v_self->action; __pyx_t_12 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_12)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); + __Pyx_INCREF(__pyx_t_12); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_1, function); + } + } + __pyx_t_4 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_12, __pyx_v_backlog_event) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_backlog_event); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "hunter/_predicates.pyx":685 + * if self._filter is None: + * self.action(backlog_event) + * elif fast_call(self._filter, backlog_event): # <<<<<<<<<<<<<< + * self.action(backlog_event) + * self.queue.clear() */ - __Pyx_TraceLine(692,0,__PYX_ERR(0, 692, __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, 692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + } + __pyx_L22:; - /* "hunter/_predicates.pyx":691 - * 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":682 + * if self._filter is None or 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(682,0,__PYX_ERR(0, 682, __pyx_L1_error)) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "hunter/_predicates.pyx":693 - * 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":687 + * elif fast_call(self._filter, backlog_event): + * self.action(backlog_event) + * self.queue.clear() # <<<<<<<<<<<<<< + * else: + * if self.strip and event.depth < 1: */ - __Pyx_TraceLine(693,0,__PYX_ERR(0, 693, __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) { + __Pyx_TraceLine(687,0,__PYX_ERR(0, 687, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->queue, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __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":694 - * 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) + /* "hunter/_predicates.pyx":648 + * result = fast_call(self.condition, event) + * if result: + * if self.queue: # <<<<<<<<<<<<<< + * self.action.cleanup() + * */ - __Pyx_TraceLine(694,0,__PYX_ERR(0, 694, __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, 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 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":647 + * + * result = fast_call(self.condition, event) + * if result: # <<<<<<<<<<<<<< + * if self.queue: + * self.action.cleanup() */ + goto __pyx_L3; } - /* "hunter/_predicates.pyx":695 - * elif type(callable) is From: - * return fast_From_call( callable, event) - * elif type(callable) is Backlog: # <<<<<<<<<<<<<< - * return fast_Backlog_call( callable, event) + /* "hunter/_predicates.pyx":689 + * 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(695,0,__PYX_ERR(0, 695, __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) { + __Pyx_TraceLine(689,0,__PYX_ERR(0, 689, __pyx_L1_error)) + /*else*/ { + __pyx_t_9 = (__pyx_v_self->strip != 0); + if (__pyx_t_9) { + } else { + __pyx_t_8 = __pyx_t_9; + goto __pyx_L24_bool_binop_done; + } + __pyx_t_9 = ((__pyx_v_event->depth < 1) != 0); + __pyx_t_8 = __pyx_t_9; + __pyx_L24_bool_binop_done:; + if (__pyx_t_8) { - /* "hunter/_predicates.pyx":696 - * return fast_From_call( callable, event) - * elif type(callable) is Backlog: - * return fast_Backlog_call( callable, event) # <<<<<<<<<<<<<< - * else: - * return callable(event) + /* "hunter/_predicates.pyx":692 + * # 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(696,0,__PYX_ERR(0, 696, __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, 696, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __Pyx_TraceLine(692,0,__PYX_ERR(0, 692, __pyx_L1_error)) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->queue, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } + } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __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":695 - * elif type(callable) is From: - * return fast_From_call( callable, event) - * elif type(callable) is Backlog: # <<<<<<<<<<<<<< - * return fast_Backlog_call( callable, event) + /* "hunter/_predicates.pyx":689 + * 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":698 - * return fast_Backlog_call( callable, event) - * else: - * return callable(event) # <<<<<<<<<<<<<< + /* "hunter/_predicates.pyx":693 + * # 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.frame = event.frame */ - __Pyx_TraceLine(698,0,__PYX_ERR(0, 698, __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)) { + __Pyx_TraceLine(693,0,__PYX_ERR(0, 693, __pyx_L1_error)) + __pyx_t_9 = (__pyx_v_self->_filter == Py_None); + __pyx_t_3 = (__pyx_t_9 != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_8 = __pyx_t_3; + goto __pyx_L27_bool_binop_done; + } + __Pyx_INCREF(__pyx_v_self->_filter); + __pyx_t_4 = __pyx_v_self->_filter; __pyx_t_1 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_1); __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, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, ((PyObject *)__pyx_v_event)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_event)); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 693, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_8 = __pyx_t_3; + __pyx_L27_bool_binop_done:; + if (__pyx_t_8) { + + /* "hunter/_predicates.pyx":694 + * 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 + * self.queue.append(detached_event) + */ + __Pyx_TraceLine(694,0,__PYX_ERR(0, 694, __pyx_L1_error)) + if ((__pyx_v_self->vars != 0)) { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->action, __pyx_n_s_try_repr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; + } else { + __Pyx_INCREF(Py_None); + __pyx_t_2 = Py_None; + } + __pyx_t_13.__pyx_n = 1; + __pyx_t_13.value_filter = __pyx_t_2; + __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_6hunter_6_event_Event *)__pyx_v_event->__pyx_vtab)->detach(__pyx_v_event, 0, &__pyx_t_13)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_detached_event = ((struct __pyx_obj_6hunter_6_event_Event *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "hunter/_predicates.pyx":695 + * 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 # <<<<<<<<<<<<<< + * self.queue.append(detached_event) + * + */ + __Pyx_TraceLine(695,0,__PYX_ERR(0, 695, __pyx_L1_error)) + __pyx_t_4 = ((PyObject *)__pyx_v_event->frame); + __Pyx_INCREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_GOTREF(__pyx_v_detached_event->frame); + __Pyx_DECREF(((PyObject *)__pyx_v_detached_event->frame)); + __pyx_v_detached_event->frame = ((PyFrameObject *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "hunter/_predicates.pyx":696 + * detached_event = event.detach(self.action.try_repr if self.vars else None) + * detached_event.frame = event.frame + * self.queue.append(detached_event) # <<<<<<<<<<<<<< + * + * return result + */ + __Pyx_TraceLine(696,0,__PYX_ERR(0, 696, __pyx_L1_error)) + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_v_self->queue, ((PyObject *)__pyx_v_detached_event)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 696, __pyx_L1_error) + + /* "hunter/_predicates.pyx":693 + * # 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.frame = event.frame + */ + } } + __pyx_L3:; - /* "hunter/_predicates.pyx":682 + /* "hunter/_predicates.pyx":698 + * self.queue.append(detached_event) * + * return result # <<<<<<<<<<<<<< + */ + __Pyx_TraceLine(698,0,__PYX_ERR(0, 698, __pyx_L1_error)) + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_result); + __pyx_r = __pyx_v_result; + goto __pyx_L0; + + /* "hunter/_predicates.pyx":632 + * ) * - * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< - * if type(callable) is Query: - * return fast_Query_call( callable, event) + * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< + * cdef bint first_is_call + * cdef Event detached_event */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); __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_12); + __Pyx_AddTraceback("hunter._predicates.fast_Backlog_call", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_detached_event); + __Pyx_XDECREF((PyObject *)__pyx_v_first_event); + __Pyx_XDECREF((PyObject *)__pyx_v_stack_event); + __Pyx_XDECREF((PyObject *)__pyx_v_first_frame); + __Pyx_XDECREF((PyObject *)__pyx_v_frame); + __Pyx_XDECREF(__pyx_v_result); + __Pyx_XDECREF(__pyx_v_stack_events); + __Pyx_XDECREF(__pyx_v_backlog_event); __Pyx_XGIVEREF(__pyx_r); __Pyx_TraceReturn(__pyx_r, 0); __Pyx_RefNannyFinishContext(); @@ -21641,15 +21641,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_From__set_state(st } /* "(tree fragment)":1 - * def __pyx_unpickle_Backlog(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_And(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ -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) { +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) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -21658,7 +21658,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog(PyObject int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_Backlog (wrapper)", 0); + __Pyx_RefNannySetupContext("__pyx_unpickle_And (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}; @@ -21684,17 +21684,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog(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_Backlog", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_And", 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_Backlog", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_And", 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_Backlog") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_And") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -21709,20 +21709,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_7__pyx_unpickle_Backlog(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Backlog", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_And", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_And", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __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); + __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); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -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) { +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) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -21738,26 +21738,26 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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)); + __Pyx_RefNannySetupContext("__pyx_unpickle_And", 0); + __Pyx_TraceCall("__pyx_unpickle_And", __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 != 0x3a83c7c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0xaa8cbda: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) */ __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3a83c7c) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xaa8cbda) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0x3a83c7c: - * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * 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_checksum != 0xaa8cbda: + * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) + * __pyx_result = And.__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) @@ -21776,16 +21776,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0x3a83c7c: + * if __pyx_checksum != 0xaa8cbda: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = Backlog.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = And.__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_0x3a, __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_0xaa, __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); @@ -21812,21 +21812,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0x3a83c7c: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0xaa8cbda: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) - * __pyx_result = Backlog.__new__(__pyx_type) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) + * __pyx_result = And.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_And__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_Backlog), __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_And), __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))) { @@ -21847,10 +21847,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) - * __pyx_result = Backlog.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) + * __pyx_result = And.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) @@ -21859,33 +21859,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = Backlog.__new__(__pyx_type) + * __pyx_result = And.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_Backlog__set_state(Backlog __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_And__set_state(And __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_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_t_3 = __pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(((struct __pyx_obj_6hunter_11_predicates_And *)__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 0x3a83c7c = (_filter, action, condition, queue, size, stack, strip, vars))" % __pyx_checksum) - * __pyx_result = Backlog.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) + * __pyx_result = And.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_And__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] + * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * __pyx_result.predicates = __pyx_state[0] */ __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); @@ -21894,7 +21894,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_Backlog(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_And(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ @@ -21905,7 +21905,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_And", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); @@ -21917,38 +21917,37 @@ static PyObject *__pyx_pf_6hunter_11_predicates_6__pyx_unpickle_Backlog(CYTHON_U } /* "(tree fragment)":11 - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_And__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__'): + * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.predicates = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ -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) { +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(struct __pyx_obj_6hunter_11_predicates_And *__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; - int __pyx_t_3; - Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_3; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; + PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__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)); + __Pyx_RefNannySetupContext("__pyx_unpickle_And__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_And__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); /* "(tree fragment)":12 * 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_result.__dict__.update(__pyx_state[8]) + * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * __pyx_result.predicates = __pyx_state[0] # <<<<<<<<<<<<<< + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) */ __Pyx_TraceLine(12,0,__PYX_ERR(2, 12, __pyx_L1_error)) if (unlikely(__pyx_v___pyx_state == Py_None)) { @@ -21957,154 +21956,86 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state } __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->_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; - __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v___pyx_result->queue); - __Pyx_DECREF(__pyx_v___pyx_result->queue); - __pyx_v___pyx_result->queue = __pyx_t_1; + __Pyx_GOTREF(__pyx_v___pyx_result->predicates); + __Pyx_DECREF(__pyx_v___pyx_result->predicates); + __pyx_v___pyx_result->predicates = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_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->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, 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->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, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v___pyx_result->strip = __pyx_t_3; - if (unlikely(__pyx_v___pyx_state == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 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_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v___pyx_result->vars = __pyx_t_3; /* "(tree fragment)":13 - * 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]) + * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * __pyx_result.predicates = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) */ __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_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 > 8) != 0); - if (__pyx_t_5) { + __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 > 1) != 0); + if (__pyx_t_4) { } else { - __pyx_t_3 = __pyx_t_5; + __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) - __pyx_t_6 = (__pyx_t_5 != 0); - __pyx_t_3 = __pyx_t_6; + __pyx_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_3) { + if (__pyx_t_2) { /* "(tree fragment)":14 - * __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_result.predicates = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): + * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ __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) + __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_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; + __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_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))) { - __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_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, 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_8, function); + __Pyx_DECREF_SET(__pyx_t_7, function); } } - __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __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_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 - * 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]) + * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * __pyx_result.predicates = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< + * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 - * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_And__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__'): + * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.predicates = __pyx_state[0] + * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ /* function exit code */ @@ -22112,10 +22043,10 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_And__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -22125,15 +22056,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Backlog__set_state } /* "(tree fragment)":1 - * def __pyx_unpickle_And(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_Or(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ -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) { +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) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -22142,7 +22073,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And(PyObject *__ int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_And (wrapper)", 0); + __Pyx_RefNannySetupContext("__pyx_unpickle_Or (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}; @@ -22168,17 +22099,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And(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_And", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Or", 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_And", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Or", 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_And") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Or") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -22193,20 +22124,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_9__pyx_unpickle_And(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_And", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Or", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_And", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Or", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __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); + __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); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -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) { +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) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -22222,8 +22153,8 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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)); + __Pyx_RefNannySetupContext("__pyx_unpickle_Or", 0); + __Pyx_TraceCall("__pyx_unpickle_Or", __pyx_f[2], 1, 0, __PYX_ERR(2, 1, __pyx_L1_error)); /* "(tree fragment)":4 * cdef object __pyx_PickleError @@ -22241,7 +22172,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE * if __pyx_checksum != 0xaa8cbda: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = And.__new__(__pyx_type) + * __pyx_result = Or.__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) @@ -22263,7 +22194,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE * if __pyx_checksum != 0xaa8cbda: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = And.__new__(__pyx_type) + * __pyx_result = Or.__new__(__pyx_type) * if __pyx_state is not None: */ __Pyx_TraceLine(6,0,__PYX_ERR(2, 6, __pyx_L1_error)) @@ -22305,12 +22236,12 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = And.__new__(__pyx_type) # <<<<<<<<<<<<<< + * __pyx_result = Or.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Or__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_And), __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_Or), __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))) { @@ -22332,9 +22263,9 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = And.__new__(__pyx_type) + * __pyx_result = Or.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) @@ -22343,32 +22274,32 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = And.__new__(__pyx_type) + * __pyx_result = Or.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Or__set_state(Or __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_And__set_state(((struct __pyx_obj_6hunter_11_predicates_And *)__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_Or__set_state(((struct __pyx_obj_6hunter_11_predicates_Or *)__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 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = And.__new__(__pyx_type) + * __pyx_result = Or.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): * __pyx_result.predicates = __pyx_state[0] */ __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) @@ -22378,7 +22309,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_And(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_Or(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ @@ -22389,7 +22320,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_And", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Or", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); @@ -22401,14 +22332,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_8__pyx_unpickle_And(CYTHON_UNUSE } /* "(tree fragment)":11 - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.predicates = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ -static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(struct __pyx_obj_6hunter_11_predicates_And *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -22423,12 +22354,12 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__pyx_unpickle_And__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_And__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__pyx_unpickle_Or__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_Or__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); /* "(tree fragment)":12 * return __pyx_result - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): * __pyx_result.predicates = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) @@ -22448,7 +22379,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): * __pyx_result.predicates = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) @@ -22507,7 +22438,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): * __pyx_result.predicates = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) @@ -22515,9 +22446,9 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str } /* "(tree fragment)":11 - * __pyx_unpickle_And__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_And__set_state(And __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< * __pyx_result.predicates = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ @@ -22530,7 +22461,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_And__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Or__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -22540,15 +22471,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_And__set_state(str } /* "(tree fragment)":1 - * def __pyx_unpickle_Or(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_Not(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ /* Python wrapper */ -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) { +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) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; @@ -22557,7 +22488,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or(PyObject *__ int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_Or (wrapper)", 0); + __Pyx_RefNannySetupContext("__pyx_unpickle_Not (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}; @@ -22583,17 +22514,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or(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_Or", 1, 3, 3, 1); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Not", 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_Or", 1, 3, 3, 2); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Not", 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_Or") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Not") < 0)) __PYX_ERR(2, 1, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -22608,20 +22539,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_11__pyx_unpickle_Or(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Or", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Not", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(2, 1, __pyx_L3_error) __pyx_L3_error:; - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Or", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Not", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __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); + __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); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -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) { +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) { PyObject *__pyx_v___pyx_PickleError = 0; PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; @@ -22637,26 +22568,26 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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)); + __Pyx_RefNannySetupContext("__pyx_unpickle_Not", 0); + __Pyx_TraceCall("__pyx_unpickle_Not", __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 != 0xaa8cbda: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0xf670ef6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) */ __Pyx_TraceLine(4,0,__PYX_ERR(2, 4, __pyx_L1_error)) - __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xaa8cbda) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xf670ef6) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0xaa8cbda: + * if __pyx_checksum != 0xf670ef6: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = Or.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) + * __pyx_result = Not.__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) @@ -22675,16 +22606,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0xaa8cbda: + * if __pyx_checksum != 0xf670ef6: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = Or.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) # <<<<<<<<<<<<<< + * __pyx_result = Not.__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_0xaa, __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_0xf6, __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); @@ -22711,21 +22642,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xaa8cbda: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0xf670ef6: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) */ } /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = Or.__new__(__pyx_type) # <<<<<<<<<<<<<< + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) + * __pyx_result = Not.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Not__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_Or), __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_Not), __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))) { @@ -22746,10 +22677,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = Or.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) + * __pyx_result = Not.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __Pyx_TraceLine(8,0,__PYX_ERR(2, 8, __pyx_L1_error)) @@ -22758,33 +22689,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = Or.__new__(__pyx_type) + * __pyx_result = Not.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): + * cdef __pyx_unpickle_Not__set_state(Not __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_Or__set_state(((struct __pyx_obj_6hunter_11_predicates_Or *)__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_Not__set_state(((struct __pyx_obj_6hunter_11_predicates_Not *)__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 0xaa8cbda = (predicates))" % __pyx_checksum) - * __pyx_result = Or.__new__(__pyx_type) + * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) + * __pyx_result = Not.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): - * __pyx_result.predicates = __pyx_state[0] + * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): + * __pyx_result.predicate = __pyx_state[0] */ __Pyx_TraceLine(10,0,__PYX_ERR(2, 10, __pyx_L1_error)) __Pyx_XDECREF(__pyx_r); @@ -22793,7 +22724,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_Or(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< + * def __pyx_unpickle_Not(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_PickleError * cdef object __pyx_result */ @@ -22804,7 +22735,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Or", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Not", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_PickleError); @@ -22816,14 +22747,14 @@ static PyObject *__pyx_pf_6hunter_11_predicates_10__pyx_unpickle_Or(CYTHON_UNUSE } /* "(tree fragment)":11 - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.predicates = __pyx_state[0] + * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.predicate = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ -static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(struct __pyx_obj_6hunter_11_predicates_Or *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(struct __pyx_obj_6hunter_11_predicates_Not *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_TraceDeclarations __Pyx_RefNannyDeclarations @@ -22838,13 +22769,13 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__pyx_unpickle_Or__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_Or__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); + __Pyx_RefNannySetupContext("__pyx_unpickle_Not__set_state", 0); + __Pyx_TraceCall("__pyx_unpickle_Not__set_state", __pyx_f[2], 11, 0, __PYX_ERR(2, 11, __pyx_L1_error)); /* "(tree fragment)":12 * return __pyx_result - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): - * __pyx_result.predicates = __pyx_state[0] # <<<<<<<<<<<<<< + * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): + * __pyx_result.predicate = __pyx_state[0] # <<<<<<<<<<<<<< * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) */ @@ -22855,16 +22786,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru } __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->predicates); - __Pyx_DECREF(__pyx_v___pyx_result->predicates); - __pyx_v___pyx_result->predicates = ((PyObject*)__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; /* "(tree fragment)":13 - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): - * __pyx_result.predicates = __pyx_state[0] + * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): + * __pyx_result.predicate = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ @@ -22887,7 +22817,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru if (__pyx_t_2) { /* "(tree fragment)":14 - * __pyx_result.predicates = __pyx_state[0] + * __pyx_result.predicate = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< */ @@ -22922,18 +22852,18 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): - * __pyx_result.predicates = __pyx_state[0] + * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): + * __pyx_result.predicate = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< * __pyx_result.__dict__.update(__pyx_state[1]) */ } /* "(tree fragment)":11 - * __pyx_unpickle_Or__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_Or__set_state(Or __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.predicates = __pyx_state[0] + * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< + * __pyx_result.predicate = __pyx_state[0] * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): */ @@ -22945,7 +22875,7 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Or__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Not__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -22955,15 +22885,15 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Or__set_state(stru } /* "(tree fragment)":1 - * def __pyx_unpickle_Not(__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_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) { +static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Backlog(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_6hunter_11_predicates_13__pyx_unpickle_Backlog = {"__pyx_unpickle_Backlog", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Backlog, METH_VARARGS|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_6hunter_11_predicates_13__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; @@ -22972,7 +22902,7 @@ static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not(PyObject *_ int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__pyx_unpickle_Not (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}; @@ -22998,17 +22928,17 @@ static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not(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_Not", 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_Not", 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_Not") < 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; @@ -23023,20 +22953,20 @@ static PyObject *__pyx_pw_6hunter_11_predicates_13__pyx_unpickle_Not(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Not", 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_Not", __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_12__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_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_12__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_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; @@ -23052,26 +22982,26 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS const char *__pyx_filename = NULL; int __pyx_clineno = 0; __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)); + __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 != 0xf670ef6: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x3a83c7c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __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 != 0xf670ef6) != 0); + __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x3a83c7c) != 0); if (__pyx_t_1) { /* "(tree fragment)":5 * cdef object __pyx_result - * if __pyx_checksum != 0xf670ef6: + * if __pyx_checksum != 0x3a83c7c: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) - * __pyx_result = Not.__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) @@ -23090,16 +23020,16 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":6 - * if __pyx_checksum != 0xf670ef6: + * if __pyx_checksum != 0x3a83c7c: * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) # <<<<<<<<<<<<<< - * __pyx_result = Not.__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_0xf6, __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); @@ -23126,21 +23056,21 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS /* "(tree fragment)":4 * cdef object __pyx_PickleError * cdef object __pyx_result - * if __pyx_checksum != 0xf670ef6: # <<<<<<<<<<<<<< + * if __pyx_checksum != 0x3a83c7c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __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 0xf670ef6 = (predicate))" % __pyx_checksum) - * __pyx_result = Not.__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_Not__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_Not), __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))) { @@ -23161,10 +23091,10 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS __pyx_t_3 = 0; /* "(tree fragment)":8 - * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf670ef6 = (predicate))" % __pyx_checksum) - * __pyx_result = Not.__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_Not__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)) @@ -23173,33 +23103,33 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS if (__pyx_t_6) { /* "(tree fragment)":9 - * __pyx_result = Not.__new__(__pyx_type) + * __pyx_result = Backlog.__new__(__pyx_type) * if __pyx_state is not None: - * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result - * cdef __pyx_unpickle_Not__set_state(Not __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_Not__set_state(((struct __pyx_obj_6hunter_11_predicates_Not *)__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 0xf670ef6 = (predicate))" % __pyx_checksum) - * __pyx_result = Not.__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_Not__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_Not__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< - * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): - * __pyx_result.predicate = __pyx_state[0] + * 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); @@ -23208,7 +23138,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS goto __pyx_L0; /* "(tree fragment)":1 - * def __pyx_unpickle_Not(__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 */ @@ -23219,7 +23149,7 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Not", __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); @@ -23231,37 +23161,38 @@ static PyObject *__pyx_pf_6hunter_11_predicates_12__pyx_unpickle_Not(CYTHON_UNUS } /* "(tree fragment)":11 - * __pyx_unpickle_Not__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.predicate = __pyx_state[0] - * if len(__pyx_state) > 1 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_Not__set_state(struct __pyx_obj_6hunter_11_predicates_Not *__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 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; + PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__pyx_unpickle_Not__set_state", 0); - __Pyx_TraceCall("__pyx_unpickle_Not__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_Not__set_state(Not __pyx_result, tuple __pyx_state): - * __pyx_result.predicate = __pyx_state[0] # <<<<<<<<<<<<<< - * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[1]) + * 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)) { @@ -23271,84 +23202,153 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(str __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->predicate); - __Pyx_DECREF(__pyx_v___pyx_result->predicate); - __pyx_v___pyx_result->predicate = __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; + __pyx_t_1 = 0; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_v___pyx_result->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->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, 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->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, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->strip = __pyx_t_3; + if (unlikely(__pyx_v___pyx_state == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(2, 12, __pyx_L1_error) + } + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 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_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v___pyx_result->vars = __pyx_t_3; /* "(tree fragment)":13 - * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): - * __pyx_result.predicate = __pyx_state[0] - * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[1]) + * 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)) { 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 > 1) != 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 > 8) != 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.predicate = __pyx_state[0] - * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): - * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<< + * __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_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, 1, 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, 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))) { + __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_Not__set_state(Not __pyx_result, tuple __pyx_state): - * __pyx_result.predicate = __pyx_state[0] - * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< - * __pyx_result.__dict__.update(__pyx_state[1]) + * 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_Not__set_state( __pyx_result, __pyx_state) + * __pyx_unpickle_Backlog__set_state( __pyx_result, __pyx_state) * return __pyx_result - * cdef __pyx_unpickle_Not__set_state(Not __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< - * __pyx_result.predicate = __pyx_state[0] - * if len(__pyx_state) > 1 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 */ @@ -23356,10 +23356,10 @@ static PyObject *__pyx_f_6hunter_11_predicates___pyx_unpickle_Not__set_state(str 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_Not__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_AddTraceback("hunter._predicates.__pyx_unpickle_Backlog__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -26803,19 +26803,19 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __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__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_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_And, 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__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_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_Or, 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_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_Not, 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_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_Backlog, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -26915,35 +26915,35 @@ static int __Pyx_modinit_type_init_code(void) { 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, 534, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 398, __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, 534, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 534, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_And, (PyObject *)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_And) < 0) __PYX_ERR(0, 398, __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, 586, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 450, __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, 586, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 586, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Or, (PyObject *)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 450, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Or) < 0) __PYX_ERR(0, 450, __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, 638, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 502, __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, 638, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 638, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Not, (PyObject *)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 502, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Not) < 0) __PYX_ERR(0, 502, __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, 264, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 @@ -26965,15 +26965,15 @@ static int __Pyx_modinit_type_init_code(void) { 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_Backlog) < 0) __PYX_ERR(0, 398, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates_Backlog) < 0) __PYX_ERR(0, 566, __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) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Backlog, (PyObject *)&__pyx_type_6hunter_11_predicates_Backlog) < 0) __PYX_ERR(0, 566, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_6hunter_11_predicates_Backlog) < 0) __PYX_ERR(0, 566, __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 @@ -27047,7 +27047,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, 541, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__) < 0) __PYX_ERR(0, 405, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_9___str__.tp_print = 0; #endif @@ -27055,7 +27055,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, 542, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr) < 0) __PYX_ERR(0, 406, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_10_genexpr.tp_print = 0; #endif @@ -27063,7 +27063,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, 594, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__) < 0) __PYX_ERR(0, 458, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_11___str__.tp_print = 0; #endif @@ -27071,7 +27071,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, 595, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 459, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_6hunter_11_predicates___pyx_scope_struct_12_genexpr.tp_print = 0; #endif @@ -27529,54 +27529,54 @@ if (!__Pyx_RefNanny) { __Pyx_TraceLine(367,0,__PYX_ERR(0, 367, __pyx_L1_error)) - /* "hunter/_predicates.pyx":464 - * ) - * - * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< - * cdef bint first_is_call - * cdef Event detached_event - */ - __Pyx_TraceLine(464,0,__PYX_ERR(0, 464, __pyx_L1_error)) - - - /* "hunter/_predicates.pyx":577 + /* "hunter/_predicates.pyx":441 * 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(577,0,__PYX_ERR(0, 577, __pyx_L1_error)) + __Pyx_TraceLine(441,0,__PYX_ERR(0, 441, __pyx_L1_error)) - /* "hunter/_predicates.pyx":630 + /* "hunter/_predicates.pyx":494 * return Not(self) * * cdef inline fast_Or_call(Or self, Event event): # <<<<<<<<<<<<<< * for predicate in self.predicates: * if fast_call(predicate, event): */ - __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error)) + __Pyx_TraceLine(494,0,__PYX_ERR(0, 494, __pyx_L1_error)) - /* "hunter/_predicates.pyx":678 + /* "hunter/_predicates.pyx":542 * return self.predicate * * cdef inline fast_Not_call(Not self, Event event): # <<<<<<<<<<<<<< * return not fast_call(self.predicate, event) * */ - __Pyx_TraceLine(678,0,__PYX_ERR(0, 678, __pyx_L1_error)) + __Pyx_TraceLine(542,0,__PYX_ERR(0, 542, __pyx_L1_error)) - /* "hunter/_predicates.pyx":682 + /* "hunter/_predicates.pyx":546 * * * cdef inline fast_call(callable, Event event): # <<<<<<<<<<<<<< * if type(callable) is Query: * return fast_Query_call( callable, event) */ - __Pyx_TraceLine(682,0,__PYX_ERR(0, 682, __pyx_L1_error)) + __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error)) + + + /* "hunter/_predicates.pyx":632 + * ) + * + * cdef inline fast_Backlog_call(Backlog self, Event event): # <<<<<<<<<<<<<< + * cdef bint first_is_call + * cdef Event detached_event + */ + __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error)) /* "(tree fragment)":1 @@ -27642,34 +27642,13 @@ 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_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_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_7__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; @@ -27690,7 +27669,7 @@ if (!__Pyx_RefNanny) { * 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_11__pyx_unpickle_Or, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_9__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; @@ -27711,7 +27690,7 @@ if (!__Pyx_RefNanny) { * 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_13__pyx_unpickle_Not, NULL, __pyx_n_s_hunter__predicates); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_6hunter_11_predicates_11__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; @@ -27726,6 +27705,27 @@ 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_13__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)) + + /* "hunter/_predicates.pyx":1 * # cython: linetrace=True, language_level=3str # <<<<<<<<<<<<<< * from __future__ import absolute_import diff --git a/tests/eviltracer.pyx b/tests/eviltracer.pyx new file mode 100644 index 0000000..109dce0 --- /dev/null +++ b/tests/eviltracer.pyx @@ -0,0 +1,60 @@ +import cython + +from cpython.pystate cimport PyThreadState_Get, PyThreadState + +import hunter + +from hunter._event cimport Event + +cdef extern from "frameobject.h": + ctypedef struct PyObject + + ctypedef class types.CodeType[object PyCodeObject]: + cdef object co_filename + cdef int co_firstlineno + + ctypedef class types.FrameType[object PyFrameObject]: + cdef CodeType f_code + cdef FrameType f_back + cdef int f_lasti + cdef int f_lineno + cdef object f_globals + cdef object f_locals + cdef PyObject *f_trace + + cdef FrameType PyFrame_New(PyThreadState*, CodeType, object, object) + +@cython.final +cdef class EvilTracer: + is_pure = False + + cdef readonly object _calls + cdef readonly object handler + cdef readonly object _tracer + + def __init__(self, *args, **kwargs): + self._calls = [] + threading_support = kwargs.pop('threading_support', False) + clear_env_var = kwargs.pop('clear_env_var', False) + self.handler = hunter._prepare_predicate(*args, **kwargs) + self._tracer = hunter.trace(self._append, threading_support=threading_support, clear_env_var=clear_env_var) + + def _append(self, Event event): + detached_event = event.detach(lambda obj: obj) + detached_event.detached = False + frame = PyFrame_New(PyThreadState_Get(), event.code, event.frame.f_globals, event.frame.f_locals) + frame.f_back = event.frame.f_back + frame.f_lasti = event.frame.f_lasti + frame.f_lineno = 0 + detached_event.frame = frame + + self._calls.append(detached_event) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self._tracer.stop() + predicate = self.handler + for call in self._calls: + predicate(call) diff --git a/tests/sample7args.py b/tests/sample7args.py index 611eeba..c5117b3 100644 --- a/tests/sample7args.py +++ b/tests/sample7args.py @@ -42,9 +42,10 @@ def six(): from utils import DebugCallPrinter from hunter import * - with trace( + trace( Backlog(stack=15, vars=True, action=DebugCallPrinter(' [' 'backlog' ']'), function='five').filter(~Q(function='six')), action=DebugCallPrinter - ): - one() - one() # make sure Backlog is reusable (doesn't have storage side-effects) + ) + one() + one() # make sure Backlog is reusable (doesn't have storage side-effects) + stop() diff --git a/tests/setup.py b/tests/setup.py index 59357ec..dedb969 100644 --- a/tests/setup.py +++ b/tests/setup.py @@ -31,10 +31,10 @@ Extension( splitext(relpath(path, 'tests').replace(os.sep, '.'))[0], sources=[path], - include_dirs=[dirname(path)], + include_dirs=[dirname(path), 'src'], define_macros=[('CYTHON_TRACE', '1')] ) for root, _, _ in os.walk('tests') for path in glob(join(root, '*.pyx' if Cython else '*.c')) - ], + ], ) diff --git a/tests/test_integration.py b/tests/test_integration.py index 16f3a59..7ff2347 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -684,52 +684,52 @@ def test_backlog_subprocess(LineMatcher): print(output) lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ - "depth=0 calls=1 *sample7args.py:4 call => one(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "depth=1 calls=2 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", - "depth=1 calls=2 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=1 calls=2 *sample7args.py:7 line two() [[]backlog[]]", - "depth=1 calls=2 *sample7args.py:10 call => two(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "depth=2 calls=3 *sample7args.py:11 line for i in range(1): # two [[]backlog[]]", - "depth=2 calls=3 *sample7args.py:12 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=2 calls=3 *sample7args.py:13 line three() [[]backlog[]]", - "depth=2 calls=3 *sample7args.py:16 call => three(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "depth=3 calls=4 *sample7args.py:17 line for i in range(1): # three [[]backlog[]]", - "depth=3 calls=4 *sample7args.py:18 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=3 calls=4 *sample7args.py:19 line four() [[]backlog[]]", - "depth=3 calls=4 *sample7args.py:22 call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", - "depth=4 calls=5 *sample7args.py:23 line for i in range(1): # four [[]backlog[]]", - "depth=4 calls=5 *sample7args.py:24 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=4 calls=5 *sample7args.py:25 line five() [[]backlog[]]", - "depth=4 calls=5 *sample7args.py:28 call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", - "depth=5 calls=6 *sample7args.py:29 line six()", - "depth=5 calls=7 *sample7args.py:30 line six()", - "depth=5 calls=8 *sample7args.py:31 line six()", - "depth=5 calls=9 *sample7args.py:32 line a = b = c[[]'side'[]] = in_five = 'effect'", - "depth=5 calls=9 *sample7args.py:33 line for i in range(1): # five", - "depth=5 calls=9 *sample7args.py:34 line return i # five", - "depth=4 calls=9 *sample7args.py:34 return <= five: 0", - "depth=0 calls=9 *sample7args.py:4 call => one(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", - "depth=1 calls=10 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", - "depth=1 calls=10 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=1 calls=10 *sample7args.py:7 line two() [[]backlog[]]", - "depth=1 calls=10 *sample7args.py:10 call => two(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", - "depth=2 calls=11 *sample7args.py:11 line for i in range(1): # two [[]backlog[]]", - "depth=2 calls=11 *sample7args.py:12 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=2 calls=11 *sample7args.py:13 line three() [[]backlog[]]", - "depth=2 calls=11 *sample7args.py:16 call => three(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", - "depth=3 calls=12 *sample7args.py:17 line for i in range(1): # three [[]backlog[]]", - "depth=3 calls=12 *sample7args.py:18 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=3 calls=12 *sample7args.py:19 line four() [[]backlog[]]", - "depth=3 calls=12 *sample7args.py:22 call => four(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", - "depth=4 calls=13 *sample7args.py:23 line for i in range(1): # four [[]backlog[]]", - "depth=4 calls=13 *sample7args.py:24 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", - "depth=4 calls=13 *sample7args.py:25 line five() [[]backlog[]]", - "depth=4 calls=13 *sample7args.py:28 call => five(a=123, b='234', c={*'side': 'effect'*})", - "depth=5 calls=14 *sample7args.py:29 line six()", - "depth=5 calls=15 *sample7args.py:30 line six()", - "depth=5 calls=16 *sample7args.py:31 line six()", - "depth=5 calls=17 *sample7args.py:32 line a = b = c[[]'side'[]] = in_five = 'effect'", - "depth=5 calls=17 *sample7args.py:33 line for i in range(1): # five", - "depth=5 calls=17 *sample7args.py:34 line return i # five", - "depth=4 calls=17 *sample7args.py:34 return <= five: 0", + "depth=0 calls=0 *sample7args.py:4 call => one(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=1 calls=1 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", + "depth=1 calls=1 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=1 calls=1 *sample7args.py:7 line two() [[]backlog[]]", + "depth=1 calls=1 *sample7args.py:10 call => two(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=2 calls=2 *sample7args.py:11 line for i in range(1): # two [[]backlog[]]", + "depth=2 calls=2 *sample7args.py:12 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=2 calls=2 *sample7args.py:13 line three() [[]backlog[]]", + "depth=2 calls=2 *sample7args.py:16 call => three(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=3 calls=3 *sample7args.py:17 line for i in range(1): # three [[]backlog[]]", + "depth=3 calls=3 *sample7args.py:18 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=3 calls=3 *sample7args.py:19 line four() [[]backlog[]]", + "depth=3 calls=3 *sample7args.py:22 call => four(a=123, b='234', c={'3': [[]4, '5'[]]}) [[]backlog[]]", + "depth=4 calls=4 *sample7args.py:23 line for i in range(1): # four [[]backlog[]]", + "depth=4 calls=4 *sample7args.py:24 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=4 calls=4 *sample7args.py:25 line five() [[]backlog[]]", + "depth=4 calls=4 *sample7args.py:28 call => five(a=123, b='234', c={'3': [[]4, '5'[]]})", + "depth=5 calls=5 *sample7args.py:29 line six()", + "depth=5 calls=6 *sample7args.py:30 line six()", + "depth=5 calls=7 *sample7args.py:31 line six()", + "depth=5 calls=8 *sample7args.py:32 line a = b = c[[]'side'[]] = in_five = 'effect'", + "depth=5 calls=8 *sample7args.py:33 line for i in range(1): # five", + "depth=5 calls=8 *sample7args.py:34 line return i # five", + "depth=4 calls=8 *sample7args.py:34 return <= five: 0", + "depth=0 calls=8 *sample7args.py:4 call => one(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=1 calls=9 *sample7args.py:5 line for i in range(1): # one [[]backlog[]]", + "depth=1 calls=9 *sample7args.py:6 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=1 calls=9 *sample7args.py:7 line two() [[]backlog[]]", + "depth=1 calls=9 *sample7args.py:10 call => two(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=2 calls=10 *sample7args.py:11 line for i in range(1): # two [[]backlog[]]", + "depth=2 calls=10 *sample7args.py:12 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=2 calls=10 *sample7args.py:13 line three() [[]backlog[]]", + "depth=2 calls=10 *sample7args.py:16 call => three(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=3 calls=11 *sample7args.py:17 line for i in range(1): # three [[]backlog[]]", + "depth=3 calls=11 *sample7args.py:18 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=3 calls=11 *sample7args.py:19 line four() [[]backlog[]]", + "depth=3 calls=11 *sample7args.py:22 call => four(a=123, b='234', c={*'side': 'effect'*}) [[]backlog[]]", + "depth=4 calls=12 *sample7args.py:23 line for i in range(1): # four [[]backlog[]]", + "depth=4 calls=12 *sample7args.py:24 line a = b = c[[]'side'[]] = 'effect' [[]backlog[]]", + "depth=4 calls=12 *sample7args.py:25 line five() [[]backlog[]]", + "depth=4 calls=12 *sample7args.py:28 call => five(a=123, b='234', c={*'side': 'effect'*})", + "depth=5 calls=13 *sample7args.py:29 line six()", + "depth=5 calls=14 *sample7args.py:30 line six()", + "depth=5 calls=15 *sample7args.py:31 line six()", + "depth=5 calls=16 *sample7args.py:32 line a = b = c[[]'side'[]] = in_five = 'effect'", + "depth=5 calls=16 *sample7args.py:33 line for i in range(1): # five", + "depth=5 calls=16 *sample7args.py:34 line return i # five", + "depth=4 calls=16 *sample7args.py:34 return <= five: 0", ]) diff --git a/tests/test_tracer.py b/tests/test_tracer.py index 3eb6f4c..0435199 100644 --- a/tests/test_tracer.py +++ b/tests/test_tracer.py @@ -35,34 +35,29 @@ except ImportError: from io import StringIO -pytest_plugins = 'pytester', - -PY3 = sys.version_info[0] == 3 - - -class EvilFrame(object): - f_back = None - f_globals = {} - f_locals = {} - f_lineno = 0 - def __init__(self, **kwargs): - self.__dict__.update(kwargs) +if hunter.Tracer.__module__ == 'hunter.tracer': + class EvilFrame(object): + f_back = None + f_globals = {} + f_locals = {} + f_lineno = 0 + def __init__(self, **kwargs): + self.__dict__.update(kwargs) -class EvilTracer(object): - is_pure = hunter.Tracer.__module__ == 'hunter.tracer' + class EvilTracer(object): + is_pure = True - def __init__(self, *args, **kwargs): - self._calls = [] - threading_support = kwargs.pop('threading_support', False) - clear_env_var = kwargs.pop('clear_env_var', False) - self.handler = hunter._prepare_predicate(*args, **kwargs) - self._tracer = hunter.trace(self._append, threading_support=threading_support, clear_env_var=clear_env_var) + def __init__(self, *args, **kwargs): + self._calls = [] + threading_support = kwargs.pop('threading_support', False) + clear_env_var = kwargs.pop('clear_env_var', False) + self.handler = hunter._prepare_predicate(*args, **kwargs) + self._tracer = hunter.trace(self._append, threading_support=threading_support, clear_env_var=clear_env_var) - def _append(self, event): - detached_event = event.detach(lambda obj: obj) - if self.is_pure: + def _append(self, event): + detached_event = event.detach(lambda obj: obj) detached_event.detached = False detached_event.frame = EvilFrame( f_globals=event.frame.f_globals, @@ -72,20 +67,26 @@ def _append(self, event): f_lasti=event.frame.f_lasti, f_code=event.code ) - self._calls.append(detached_event) + self._calls.append(detached_event) - def __enter__(self): - return self + def __enter__(self): + return self - def __exit__(self, exc_type, exc_val, exc_tb): - self._tracer.stop() - predicate = self.handler - for call in self._calls: - predicate(call) + def __exit__(self, exc_type, exc_val, exc_tb): + self._tracer.stop() + predicate = self.handler + for call in self._calls: + predicate(call) +else: + from eviltracer import EvilTracer trace = EvilTracer +pytest_plugins = 'pytester', + +PY3 = sys.version_info[0] == 3 + def test_mix_predicates_with_callables(): hunter._prepare_predicate(Q(module=1) | Q(lambda: 2)) @@ -1400,8 +1401,6 @@ def test_stack_printer_1(LineMatcher): lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ "*sample7.py:??:five <= sample7.py:??:four <= sample7.py:??:three <= sample7.py:??:two <= sample7.py:?:one <= test_tracer.py:????:test_stack_printer*" - if trace.is_pure else - "*sample7.py:30:five <= no frames available (detached=True)" ]) @@ -1415,8 +1414,6 @@ def test_stack_printer_2(LineMatcher): lm = LineMatcher(output.splitlines()) lm.fnmatch_lines([ "*sample7.py:??:five <= tests/sample7.py:??:four <= tests/sample7.py:??:three <= tests/sample7.py:??:two <= tests/sample7.py:?:one <= tests/test_tracer.py:????:test_stack_printer*" - if trace.is_pure else - "*sample7.py:30:five <= no frames available (detached=True)" ]) From 5581cbeea5cc9a90ddd3d9cd8e7fe4b876658fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 14:20:25 +0300 Subject: [PATCH 36/38] Looks like setuptools-scm broke some stuff. Ref https://github.com/pypa/setuptools_scm/issues/442. --- pyproject.toml | 2 +- setup.py | 4 ++-- tox.ini | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 23cf6d7..65a0a83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ requires = [ "setuptools>=30.3.0", "wheel", - "setuptools_scm>=3.3.1", + "setuptools_scm>=3.3.1,<4.0", ] diff --git a/setup.py b/setup.py index eedf004..35e052d 100644 --- a/setup.py +++ b/setup.py @@ -164,10 +164,10 @@ def _unavailable(self, e): ':platform_system != "Windows"': ['manhole >= 1.5'], }, setup_requires=[ - 'setuptools_scm>=3.3.1', + 'setuptools_scm>=3.3.1,<4.0', 'cython', ] if Cython else [ - 'setuptools_scm>=3.3.1', + 'setuptools_scm>=3.3.1,<4.0', ], entry_points={ 'console_scripts': [ diff --git a/tox.ini b/tox.ini index cb17678..edec166 100644 --- a/tox.ini +++ b/tox.ini @@ -43,13 +43,12 @@ deps = pytest pytest-travis-fold pytest-benchmark - pytest-random-order colorama==0.4.3 cover: pytest-cov {cython,cover}: cython==0.29.19 manhole==1.6.0 process-tests - setuptools-scm + setuptools-scm<4.0 aspectlib commands = {py27,py33,py34,py35,py36,py36,py37,py38}: python tests/setup.py clean --all build_ext --force --inplace From 5f23744894f35d371b0ea21c556f68363ba8aa09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 14:43:01 +0300 Subject: [PATCH 37/38] Cleanup. --- src/hunter/__init__.py | 1 + src/hunter/predicates.py | 2 -- src/hunter/util.py | 15 --------------- tests/test_integration.py | 2 -- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/hunter/__init__.py b/src/hunter/__init__.py index 5b39bdf..2931264 100644 --- a/src/hunter/__init__.py +++ b/src/hunter/__init__.py @@ -17,6 +17,7 @@ from .actions import StackPrinter from .actions import VarsPrinter from .actions import VarsSnooper + try: if os.environ.get('PUREPYTHONHUNTER'): raise ImportError('Cython speedups are disabled.') diff --git a/src/hunter/predicates.py b/src/hunter/predicates.py index b3e34ff..10d7cf5 100644 --- a/src/hunter/predicates.py +++ b/src/hunter/predicates.py @@ -4,13 +4,11 @@ import inspect import re from itertools import chain -from itertools import islice from .actions import Action from .actions import ColorStreamAction from .event import Event from .util import StringType -from .util import frame_iterator __all__ = ( 'And', diff --git a/src/hunter/util.py b/src/hunter/util.py index e580fbf..33edcb7 100644 --- a/src/hunter/util.py +++ b/src/hunter/util.py @@ -8,8 +8,6 @@ from collections import defaultdict from collections import deque -import hunter - from .vendor.colorama import Back from .vendor.colorama import Fore from .vendor.colorama import Style @@ -196,16 +194,3 @@ def frame_iterator(frame): while frame: yield frame frame = frame.f_back - - -def convert_num_calls_to_pure_or_cython(lines): - is_not_pure = hunter.Tracer.__module__ != 'hunter.tracer' - - def inc_if_not_pure(i): - return int(i) - is_not_pure - - regex = 'calls=(\d+)' - return [ - re.sub(regex, 'calls={}'.format(inc_if_not_pure(re.search(regex, line).group(1))), line) - for line in lines - ] diff --git a/tests/test_integration.py b/tests/test_integration.py index 7ff2347..12441f3 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -24,8 +24,6 @@ from utils import DebugCallPrinter -from hunter.util import convert_num_calls_to_pure_or_cython - try: from cStringIO import StringIO except ImportError: From b265dac1f14cf1dd543bac47b167e12a79e597fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Mon, 25 May 2020 22:20:18 +0300 Subject: [PATCH 38/38] Use any python. --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index edec166..cc58294 100644 --- a/tox.ini +++ b/tox.ini @@ -24,11 +24,12 @@ basepython = pypy: {env:TOXPYTHON:pypy} pypy3: {env:TOXPYTHON:pypy3} py27: {env:TOXPYTHON:python2.7} + py3: {env:TOXPYTHON:python3} py35: {env:TOXPYTHON:python3.5} py36: {env:TOXPYTHON:python3.6} py37: {env:TOXPYTHON:python3.7} py38: {env:TOXPYTHON:python3.8} - {py3,bootstrap,clean,check,docs,report,codecov}: {env:TOXPYTHON:python3} + {bootstrap,clean,check,docs,report}: {env:TOXPYTHON:python} setenv = PYTHONPATH={toxinidir}/tests PYTHONUNBUFFERED=yes