[prerelease] Removed instance
attribute on Module
/ Class
#9486
Labels
topic: collection
related to the collection phase
type: backward compatibility
might present some backward compatibility issues which should be carefully noted in the changelog
Milestone
Yet another subtle API break I discovered in 7.0.0 (sorry...):
Before #9277,
Module
andClass
nodes had ainstance
attribute fromPyobjMixin
(viaPyCollector
). With that change, that attribute now is only available onFunction
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
The text was updated successfully, but these errors were encountered: