invocation-tree 0.0.23__tar.gz → 0.0.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {invocation_tree-0.0.23/invocation_tree.egg-info → invocation_tree-0.0.24}/PKG-INFO +1 -1
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/invocation_tree/__init__.py +10 -8
- {invocation_tree-0.0.23 → invocation_tree-0.0.24/invocation_tree.egg-info}/PKG-INFO +1 -1
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/pyproject.toml +1 -1
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/LICENSE.txt +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/MANIFEST.in +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/README.md +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/compute.gif +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/compute.py +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/create_gif.sh +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/create_images.sh +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/factorial.gif +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/factorial.py +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/permutations.gif +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/permutations.py +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/students.gif +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/students.py +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/images/vscode.png +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/invocation_tree.egg-info/SOURCES.txt +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/invocation_tree.egg-info/dependency_links.txt +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/invocation_tree.egg-info/requires.txt +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/invocation_tree.egg-info/top_level.txt +0 -0
- {invocation_tree-0.0.23 → invocation_tree-0.0.24}/setup.cfg +0 -0
|
@@ -7,7 +7,7 @@ import html
|
|
|
7
7
|
import sys
|
|
8
8
|
import difflib
|
|
9
9
|
|
|
10
|
-
__version__ = "0.0.
|
|
10
|
+
__version__ = "0.0.24"
|
|
11
11
|
__author__ = 'Bas Terwijn'
|
|
12
12
|
|
|
13
13
|
def highlight_diff(str1, str2):
|
|
@@ -75,7 +75,8 @@ class Invocation_Tree:
|
|
|
75
75
|
to_string=None,
|
|
76
76
|
hide_vars=None,
|
|
77
77
|
cleanup=True,
|
|
78
|
-
quiet=True
|
|
78
|
+
quiet=True,
|
|
79
|
+
keep_tracing=False):
|
|
79
80
|
# --- config
|
|
80
81
|
self.filename = filename
|
|
81
82
|
self.prev_filename = None
|
|
@@ -111,6 +112,7 @@ class Invocation_Tree:
|
|
|
111
112
|
self.hide_calls = {'Invocation_Tree.__exit__', 'Invocation_Tree.stop_trace'}
|
|
112
113
|
self.ignore_calls = set()
|
|
113
114
|
self.ignoring_call = None
|
|
115
|
+
self.keep_tracing = keep_tracing
|
|
114
116
|
|
|
115
117
|
def __repr__(self):
|
|
116
118
|
return f'Invocation_Tree(filename={repr(self.filename)}, show={self.show}, block={self.block}, each_line={self.each_line}, gifcount={self.gifcount})'
|
|
@@ -121,7 +123,8 @@ class Invocation_Tree:
|
|
|
121
123
|
sys.settrace(self.global_tracer)
|
|
122
124
|
result = fun(*args, **kwargs)
|
|
123
125
|
finally:
|
|
124
|
-
|
|
126
|
+
if not self.keep_tracing:
|
|
127
|
+
sys.settrace(self.prev_global_tracer)
|
|
125
128
|
return result
|
|
126
129
|
|
|
127
130
|
def value_to_string(self, key, value, use_repr=False):
|
|
@@ -305,16 +308,15 @@ class Invocation_Tree:
|
|
|
305
308
|
prev_local_tracer = prev_local_tracer(frame, event, arg)
|
|
306
309
|
# if prev_local_tracer is None:
|
|
307
310
|
# return None # stop tracing if debugger stopped tracing
|
|
308
|
-
self.reset_tracer()
|
|
311
|
+
self.reset_tracer(self.global_tracer)
|
|
309
312
|
return local_multiplexer
|
|
310
313
|
|
|
311
314
|
return local_multiplexer
|
|
312
315
|
|
|
313
|
-
def reset_tracer(self, hard
|
|
314
|
-
""" Reset the global tracer to
|
|
316
|
+
def reset_tracer(self, tracer=None, hard=False):
|
|
317
|
+
""" Reset the global tracer to 'tracer' use None or self.global_tracer. """
|
|
315
318
|
if hard or sys.gettrace() == None:
|
|
316
|
-
sys.settrace(
|
|
317
|
-
|
|
319
|
+
sys.settrace(tracer) # reinforce global tracer, as DBD debugger 'continue' may disable it
|
|
318
320
|
|
|
319
321
|
def blocking(filename='tree.pdf'):
|
|
320
322
|
return Invocation_Tree(filename=filename)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{invocation_tree-0.0.23 → invocation_tree-0.0.24}/invocation_tree.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|