• Raphaël Hertzog's avatar
    Fixed #25761 -- Added __cause__.__traceback__ to reraised exceptions. · 9f4e031b
    Raphaël Hertzog yazdı
    When Django reraises an exception, it sets the __cause__ attribute even
    in Python 2, mimicking Python's 3 behavior for "raise Foo from Bar".
    However, Python 3 also ensures that all exceptions have a __traceback__
    attribute and thus the "traceback2" Python 2 module (backport of Python
    3's "traceback" module) relies on the fact that whenever you have a
    __cause__ attribute, the recorded exception also has a __traceback__
    attribute.
    
    This is breaking testtools which is using traceback2 (see
    https://github.com/testing-cabal/testtools/issues/162).
    
    This commit fixes this inconsistency by ensuring that Django sets
    the __traceback__ attribute on any exception stored in a __cause__
    attribute of a reraised exception.
    9f4e031b
Adı
Son kayıt (commit)
Son güncelleme
..
_ext Loading commit data...
_theme Loading commit data...
faq Loading commit data...
howto Loading commit data...
internals Loading commit data...
intro Loading commit data...
man Loading commit data...
misc Loading commit data...
ref Loading commit data...
releases Loading commit data...
topics Loading commit data...
Makefile Loading commit data...
README Loading commit data...
conf.py Loading commit data...
contents.txt Loading commit data...
glossary.txt Loading commit data...
index.txt Loading commit data...
make.bat Loading commit data...
spelling_wordlist Loading commit data...