Configuration attributes
Behavior that applies to a whole tracer is set with class-level attributes on
your BaseTracer subclass. Set them in the class body:
class CoverageTracer(pyc.BaseTracer):
bytecode_caching_allowed = False
# ... handlers ...
Attribute |
Default |
Effect |
|---|---|---|
|
|
Instrument every imported file, ignoring
|
|
|
Allow handlers to fire while another event is already being handled.
Needed by macro-style tracers (see |
|
|
Emit events from threads other than the one that entered the tracing context. |
|
|
Retain the AST bookkeeping tables (node-by-id, parent links, augmentations). Turn off only if no handler needs resolved nodes. |
|
|
Install the |
|
|
Enable the global guard machinery. Purely transformational tracers (that
only rewrite syntax) set this |
|
|
Allow cached instrumented bytecode. Coverage-style tracers set this
|
|
|
Let |
|
|
Register pre-instrumentation source in |
|
The rewriter class to use; override to customize the transform. |
See also
The overridable methods (should_instrument_file and friends) are on the
BaseTracer reference; Why composing tracers works explains why
transformational tracers set global_guards_enabled = False.