repr(CIMultiDictProxy(CIMultiDict())) clears current exception #410
Closed
Description
Reproducer:
from aiohttp.multidict import CIMultiDictProxy, CIMultiDict
import sys
try:
raise Exception
except Exception:
print(sys.exc_info())
repr(CIMultiDictProxy(CIMultiDict()))
print(sys.exc_info())
Results:
(<class 'Exception'>, Exception(), <traceback object at 0x101a3d048>)
(None, None, None)
This is fairly serious; if you stick an 'as e' at the end of 'except Exception' and a 'raise' at the end of the except block, you wind up with a segfault.
Discovered in version 0.14.4, confirmed in 0.16.3.