[Merge] lp:~hopem/ubuntu/raring/python-eventlet/lp1199037 into lp:ubuntu/raring/python-eventlet
Adam Stokes
adam.stokes at canonical.com
Wed Jul 31 14:28:42 UTC 2013
Adam Stokes has proposed merging lp:~hopem/ubuntu/raring/python-eventlet/lp1199037 into lp:ubuntu/raring/python-eventlet.
Requested reviews:
Ubuntu branches (ubuntu-branches)
Related bugs:
Bug #1199037 in python-eventlet (Ubuntu Raring): "backport eventlet exception context fix"
https://bugs.launchpad.net/ubuntu/raring/+source/python-eventlet/+bug/1199037
For more details, see:
https://code.launchpad.net/~hopem/ubuntu/raring/python-eventlet/lp1199037/+merge/177856
If a yield occurs in an except clause prior to wildcard raise, when the thread is re-scheduled the raise generates a TypeError since the caught exception has NoneType e.g.
#!/usr/bin/env python
import eventlet
def exc_test_pass(id):
try:
raise Exception("foo[%s]" % (id))
except Exception as e:
eventlet.sleep(0) # yield
raise e
def exc_test_fail(id):
try:
raise Exception("foo[%s]" % (id))
except Exception:
eventlet.sleep(0) # yield
raise
pool = eventlet.GreenPool()
# This one does what we want i.e. Exception("foo[0]") get propagated
pool.spawn(exc_test_pass, 0)
# This one does not do what we want since we get a TypeError. This is because
# the caught exception is not being saved/restored by the context switch.
pool.spawn(exc_test_fail, 1)
pool.waitall()
This MP fixes the above.
--
https://code.launchpad.net/~hopem/ubuntu/raring/python-eventlet/lp1199037/+merge/177856
Your team Ubuntu branches is requested to review the proposed merge of lp:~hopem/ubuntu/raring/python-eventlet/lp1199037 into lp:ubuntu/raring/python-eventlet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 5982 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20130731/114c8c37/attachment-0001.diff>
More information about the Ubuntu-reviews
mailing list