You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to this commit, the HIDE_IN_STACKTRACES setting was implemented by
importing the modules listed in the setting and recording their file
system paths. Then tidy_stacktrace() and
_StackRecorder.get_stack_trace() would look up the file system path for
each frame's code object and compare that path against the paths for the
excluded modules to see if it matched. If so, the frame would be
excluded.
This was inefficient since it used a file system access,
os.path.realpath(), for each frame (although the _StackRecorder
implementation included some caching to reduce the cost). It also would
not work correctly for namespace packages since they can have multiple
file system hierarchies.
Replace with a new implementation that instead retrieves the __name__
variable from the frame's f_globals attribute and matches that module
name against the list of excluded modules directly.
0 commit comments