-
Notifications
You must be signed in to change notification settings - Fork 3
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
reraise is complicated #7
Comments
To figure out why it is this way we should investigate the pyramid_tm logic and commit history, hopefully it explains things. |
That had caught my eye too. AFAICS there is no reason why a naked |
Here's the relevant commit: Pylons/pyramid_tm@1c4c389 They went from a context manager, which requires I'm definitely of the opinion that except:
ex_type, ex_value = sys.exc_info()[:2]
retryable = manager._retryable(ex_type, ex_value)
manager.abort()
if (number <= 0) or (not retryable):
raise |
@taschini thanks for looking into it! Go ahead and apply this simplication. |
There's complicated logic to implement a
reraise
functionality, different in Python 2 and 3. I am wondering why this is not simply implemented withraise
(without arguments). Perhaps this has to do with some kind of traceback manipulation I don't quite understand.Note also that the PY3 compat layer defines an
exec_
function that doesn't appear to be used.If we can get rid of the complexity that would be nice -- running exec and frame manipulation is pretty extreme.
The text was updated successfully, but these errors were encountered: