File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,8 @@ def test_aggregates(sentry_init, capture_envelopes):
51
51
envelopes = capture_envelopes ()
52
52
53
53
with auto_session_tracking (session_mode = "request" ):
54
- with sentry_sdk .push_scope () :
54
+ with sentry_sdk .new_scope () as scope :
55
55
try :
56
- scope = sentry_sdk .Scope .get_current_scope ()
57
56
scope .set_user ({"id" : "42" })
58
57
raise Exception ("all is wrong" )
59
58
except Exception :
@@ -92,7 +91,7 @@ def test_aggregates_explicitly_disabled_session_tracking_request_mode(
92
91
envelopes = capture_envelopes ()
93
92
94
93
with auto_session_tracking (session_mode = "request" ):
95
- with sentry_sdk .push_scope ():
94
+ with sentry_sdk .new_scope ():
96
95
try :
97
96
raise Exception ("all is wrong" )
98
97
except Exception :
@@ -127,7 +126,7 @@ def test_no_thread_on_shutdown_no_errors(sentry_init):
127
126
side_effect = RuntimeError ("can't create new thread at interpreter shutdown" ),
128
127
):
129
128
with auto_session_tracking (session_mode = "request" ):
130
- with sentry_sdk .push_scope ():
129
+ with sentry_sdk .new_scope ():
131
130
try :
132
131
raise Exception ("all is wrong" )
133
132
except Exception :
You can’t perform that action at this time.
0 commit comments