Skip to content

Commit

Permalink
Store modules and line numbers as strings, not the whole frames
Browse files Browse the repository at this point in the history
  • Loading branch information
mrakitin committed Feb 2, 2021
1 parent 12e15ed commit adb50f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ophyd/ophydobj.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def __init__(self, *, name=None, attr_name='', parent=None, labels=None,
kind=None):

if OPHYD_DEBUG_WITH_INSPECT:
self._stack_init = inspect.stack()
stack = inspect.stack()
self._stack_init = [f'{s.filename}:{s.lineno}' for s in stack]

if labels is None:
labels = set()
Expand Down Expand Up @@ -229,7 +230,8 @@ def __init_subclass__(cls, version=None, version_of=None,

if OPHYD_DEBUG_WITH_INSPECT:
print(f'Subclassing {cls.__name__}...')
cls._stack_subclass = inspect.stack()
stack = inspect.stack()
cls._stack_subclass = [f'{s.filename}:{s.lineno}' for s in stack]

super().__init_subclass__(**kwargs)

Expand Down

0 comments on commit adb50f8

Please sign in to comment.