Closed
Description
Yet another subtle API break I discovered in 7.0.0 (sorry...):
Before #9277, Module
and Class
nodes had a instance
attribute from PyobjMixin
(via PyCollector
). With that change, that attribute now is only available on Function
nodes.
This affected pytest-randomly - I don't see a good way to find out how much more it affects (can't really search for .instance
, and there are lots of ways to get to those nodes).
I doubt it will affect much more, but we should either re-add the attribute (probably just set to None
plus a deprecation warning?), or if we decide to remove it without a deprecation (fine by me), at least document the removal as usual.
cc @bluetech