Handle different type repr in < 3.2.
Handle absence of __context__ and __cause__ on < 3.x