-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(sessions): Replace push_scope
#3354
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sentrivana
approved these changes
Jul 26, 2024
sl0thentr0py
approved these changes
Jul 26, 2024
Use `Scope.get_isolation_scope` instead. Ref #3344
Replace the only `configure_scope` usage in `test_client.py`, which can be replaced without defeating the test's purpose, with `Scope.get_isolation_scope`. The other `configure_scope` calls are made either from a test which specifically tests `configure_scope` or from a test which is always skipped. Closes: #3344
Although `configure_scope` was meant to be deprecated since Sentry SDK 2.0.0, calling `configure_scope` did not raise a deprecation warning. Now, it does. Fixes #3346
Most of the `push_scope` usages in `test_basics.py` need to stay, as they test functionality specific to `push_scope`. However, in `test_scope_event_processor_order`, the `push_scope` can be replaced with `new_scope`. We make this replacement here. Ref: #3345
All usages of `sentry_sdk.push_scope` in `test_sessions.py` can be replaced with `new_scope`. Closes: #3345
0b60ace
to
20ed5b7
Compare
d09b113
to
c8e93af
Compare
3483499
to
c8e93af
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #3354 +/- ##
=======================================
Coverage 79.78% 79.78%
=======================================
Files 133 133
Lines 14319 14321 +2
Branches 3009 3009
=======================================
+ Hits 11424 11426 +2
+ Misses 2072 2071 -1
- Partials 823 824 +1
|
To merge this PR stack, I combined multiple PRs into this PR before merging. Each individual commit message references the PR where that commit was reviewed |
szokeasaurusrex
added a commit
that referenced
this pull request
Aug 8, 2024
sentrivana
pushed a commit
that referenced
this pull request
Aug 12, 2024
arjennienhuis
pushed a commit
to arjennienhuis/sentry-python
that referenced
this pull request
Sep 30, 2024
All usages of `sentry_sdk.push_scope` in `test_sessions.py` can be replaced with `new_scope`. Closes: getsentry#3345
arjennienhuis
pushed a commit
to arjennienhuis/sentry-python
that referenced
this pull request
Sep 30, 2024
We removed this line in getsentry#3354 since it is no longer needed, but it was apparently accidentally added back in getsentry#3357.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All usages of
sentry_sdk.push_scope
intest_sessions.py
can bereplaced with
new_scope
.Closes: #3345