fixtures: change FixtureDef.cached_result[2]
from exception triplet to exception
#11208
Labels
topic: fixtures
anything involving fixtures directly or indirectly
type: proposal
proposal for a new feature, often to gather opinions or design the API around the new feature
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_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 ofcached_result[2]
, except forpytest-yield
plugin, but it's already broken in recent pytests and only supports pytest<=4.The text was updated successfully, but these errors were encountered: