Correctly preserve exception __context__ in MultiError.catch by njsmith · Pull Request #165 · python-trio/trio

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@njsmith

Copy link

Member

@njsmith njsmith commented

May 19, 2017

Python's implicit exception chaining logic insists on corrupting
context when we re-raise an unpacked exception in
MultiError.catch. This commit introduces a counter-measure.

Python's implicit exception chaining logic insists on corrupting
__context__ when we re-raise an unpacked exception in
MultiError.catch. This commit introduces a counter-measure.

@codecov

Copy link

codecov bot commented

May 19, 2017

edited

Loading

Codecov Report

Merging #165 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #165      +/-   ##
=========================================
- Coverage   98.43%   98.4%   -0.03%     
=========================================
  Files          51      51              
  Lines        5939    5960      +21     
  Branches      468     470       +2     
=========================================
+ Hits         5846    5865      +19     
- Misses         79      80       +1     
- Partials       14      15       +1
Impacted Files Coverage Δ
trio/_core/_multierror.py 100% <100%> (ø) ⬆️
trio/_core/tests/test_multierror.py 100% <100%> (ø) ⬆️
trio/_util.py 81.35% <0%> (-3.39%) ⬇️

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 0cac9f6...a2af710. Read the comment docs.

@njsmith

Copy link

Member Author

njsmith commented

May 19, 2017

That's weird, appveyor seems to have just... not noticed this PR at all. It hasn't even attempted to build it. Maybe closing and opening again will make it notice?

@njsmith njsmith closed this

May 19, 2017

@njsmith njsmith reopened this

May 19, 2017

@njsmith njsmith merged commit f64200c into python-trio:master

May 19, 2017

@njsmith njsmith deleted the save-the-__context__ branch

May 19, 2017 07:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@njsmith