Skip to content

fix: Push scope for each response chunk#218

Merged
untitaker merged 3 commits into
masterfrom
fix/wsgi-close-response
Dec 19, 2018
Merged

fix: Push scope for each response chunk#218
untitaker merged 3 commits into
masterfrom
fix/wsgi-close-response

Conversation

@untitaker

@untitaker untitaker commented Dec 18, 2018

Copy link
Copy Markdown
Member

This will make WSGI apps more tolerant against:

  • WSGI servers streaming responses from a different thread/from different threads than the one that called start_response
  • close not being called
  • WSGI servers streaming responses interleaved from the same thread

I have no idea or opinion about performance impact but I don't think it's much?

@untitaker
untitaker requested a review from mitsuhiko December 18, 2018 20:22
@codecov-io

codecov-io commented Dec 18, 2018

Copy link
Copy Markdown

Codecov Report

Merging #218 into master will decrease coverage by 0.54%.
The diff coverage is 67.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #218      +/-   ##
==========================================
- Coverage   80.63%   80.09%   -0.55%     
==========================================
  Files          31       31              
  Lines        2608     2592      -16     
  Branches      442      439       -3     
==========================================
- Hits         2103     2076      -27     
- Misses        327      329       +2     
- Partials      178      187       +9
Impacted Files Coverage Δ
sentry_sdk/_compat.py 80% <ø> (-4%) ⬇️
sentry_sdk/integrations/wsgi.py 76.14% <67.74%> (-6.36%) ⬇️
sentry_sdk/integrations/django/__init__.py 80.79% <0%> (-3.39%) ⬇️
sentry_sdk/hub.py 84.69% <0%> (+0.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52fd228...510e64e. Read the comment docs.

@untitaker untitaker mentioned this pull request Dec 19, 2018
@untitaker
untitaker merged commit 7b01082 into master Dec 19, 2018
@untitaker
untitaker deleted the fix/wsgi-close-response branch December 19, 2018 10:37
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.

3 participants