Skip to content

Conversation

@szokeasaurusrex
Copy link
Member

It is possible to use the return value of sentry_sdk.init as a context manager; however, this functionality has not been maintained for a long time, and it does not seem to be documented anywhere.

So, we are deprecating this functionality, and we will remove it in the next major release.

Closes #3282

@codecov
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.38%. Comparing base (200d0cd) to head (eba2763).
Report is 2 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3729      +/-   ##
==========================================
+ Coverage   84.37%   84.38%   +0.01%     
==========================================
  Files         136      136              
  Lines       14375    14379       +4     
  Branches     2422     2422              
==========================================
+ Hits        12129    12134       +5     
+ Misses       1495     1493       -2     
- Partials      751      752       +1     
Files with missing lines Coverage Δ
sentry_sdk/_init_implementation.py 95.83% <100.00%> (+15.83%) ⬆️

... and 2 files with indirect coverage changes

Copy link
Contributor

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

It is possible to use the return value of `sentry_sdk.init` as a context manager; however, this functionality has not been maintained for a long time, and it does not seem to be documented anywhere.

So, we are deprecating this functionality, and we will remove it in the next major release.

Closes #3282
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/deprecate-init-context-manager branch from 399c344 to eba2763 Compare November 12, 2024 07:41
@szokeasaurusrex szokeasaurusrex enabled auto-merge (squash) November 12, 2024 07:41
@szokeasaurusrex szokeasaurusrex merged commit d424226 into master Nov 12, 2024
136 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/deprecate-init-context-manager branch November 12, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate init context manager

3 participants