I propose changing the type of the 3rd item of FixtureDef.cached_result (which indicates a cached exception outcome of the fixture) from a sys.exc_info style triplet to just the exception instance.
The sys.exc_info exception triplet format is legacy from Python 2 and just complicates things nowadays.
While cached_result is not documented and is a private API, from 680 plugins I have checked out locally, 15 access it. However, none of them care about the type of cached_result[2], except for pytest-yield plugin, but it's already broken in recent pytests and only supports pytest<=4.
I propose changing the type of the 3rd item of
FixtureDef.cached_result(which indicates a cached exception outcome of the fixture) from asys.exc_infostyle triplet to just the exception instance.The
sys.exc_infoexception triplet format is legacy from Python 2 and just complicates things nowadays.While
cached_resultis not documented and is a private API, from 680 plugins I have checked out locally, 15 access it. However, none of them care about the type ofcached_result[2], except forpytest-yieldplugin, but it's already broken in recent pytests and only supports pytest<=4.