[pytest-dev] Deprecating "calling" Nodes

RonnyPfannschmidt opensource at ronnypfannschmidt.de
Wed Nov 7 15:56:24 EST 2018

Hi everyone,

i'm facing a really harsh dilemma with the the way we initialize Nodes
and their subclasses

the __init__ methods are just plain "wrong" in terms of doing a lot of
logic and "Magically" putting things in place.

this makes both structural changes and porting to attrs practically
In order to elevate this structural problem i'd like to sort out the way
we invoke them and deprecate calling them

main reason being that if direct "calling" is no longer valid behavior
for clients and down streams, the logic can be moved to more
controllable and testable places

in order to facilitate this, i'd create a NodeMetaClass  which has
support methods for instance creation and
allows for custom functions/methods to be called.

-- Ronny

More information about the pytest-dev mailing list