This repository was archived by the owner on Oct 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ Changelog
4
4
All notable changes to this project will be documented in this file.
5
5
Project adheres to [ Semantic Versioning] ( http://semver.org/spec/v2.0.0.html ) .
6
6
7
+ 6.10.0
8
+ ------
9
+
10
+ * [ Core] Fixed stackframes in some situations being in inverse order.
11
+
7
12
6.9.0 (2018-05-30)
8
13
------------------
9
14
* [ Core] Switched from culprit to transaction for automatic transaction reporting.
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ def iter_stack_frames(frames=None):
134
134
if not frames :
135
135
frames = inspect .stack ()[1 :]
136
136
137
- for frame , lineno in ((f [0 ], f [2 ]) for f in frames ):
137
+ for frame , lineno in ((f [0 ], f [2 ]) for f in reversed ( frames ) ):
138
138
f_locals = getattr (frame , 'f_locals' , {})
139
139
if not _getitem_from_frame (f_locals , '__traceback_hide__' ):
140
140
yield frame , lineno
Original file line number Diff line number Diff line change @@ -491,7 +491,7 @@ def bar():
491
491
self .assertEquals (event ['message' ], 'test' )
492
492
assert 'stacktrace' in event
493
493
self .assertEquals (len (frames ), len (event ['stacktrace' ]['frames' ]))
494
- for frame , frame_i in zip (frames , event ['stacktrace' ]['frames' ]):
494
+ for frame , frame_i in zip (frames [:: - 1 ] , event ['stacktrace' ]['frames' ]):
495
495
self .assertEquals (frame [0 ].f_code .co_filename , frame_i ['abs_path' ])
496
496
self .assertEquals (frame [0 ].f_code .co_name , frame_i ['function' ])
497
497
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ def test_record_stack(self):
171
171
self .assertTrue ('stacktrace' in event )
172
172
frames = event ['stacktrace' ]['frames' ]
173
173
self .assertNotEquals (len (frames ), 1 )
174
- frame = frames [0 ]
174
+ frame = frames [- 1 ]
175
175
self .assertEqual (frame ['module' ], 'raven.handlers.logging' )
176
176
assert 'exception' not in event
177
177
self .assertTrue ('sentry.interfaces.Message' in event )
You can’t perform that action at this time.
0 commit comments