[pytest-dev] Building the Rationale for upcoming changes in the node construction apis

Bruno Oliveira nicoddemus at gmail.com
Thu Oct 24 17:23:22 EDT 2019


Hi Ronny,

Thanks for all the hard work on this, I'm sure the final result will be as
good/valuable as all the internal mark refactoring.

Cheers,
Bruno

On Thu, Oct 24, 2019 at 6:20 PM RonnyPfannschmidt <
opensource at ronnypfannschmidt.de> wrote:

> Hi everyone,
>
> in https://github.com/pytest-dev/pytest/pull/5975 i have startet to
> prepare a POC with a ambitious goal,
> i want to remove much of the mind boggling smartness from the constructors
> and i want to streamline note constructors in order to reduce the
> coupling in the different types of nodes.
>
> The tight coupling and tricky construction of nodes has repeatedly
> foiled my attempts to refactor both fixtures/fixture caching and
> setupstate as well as
> actually introducing FunctionDefinition in the public api (and shifting
> generate_tests to it) and retiring Instance.
>
> So from my pov its  not sustainable to leave them be, as they prevent
> other required improvements.
> However as far as i can tell its next to impossible without breaking
> things.
>
> The Rough idea i have for iteratively solving it is to
>
> a) introduce Node.from_parent as the convention for node construction
> b) deprecate Node.__init__ being invoked outside of such a function
> c) destroy all the things and have a cupcake
>
> Whats needed in addition is a slightly  more eloquent version of the
> description for the  documentation.
>
> -- Ronny
>
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20191024/6f3ee87f/attachment-0001.html>


More information about the pytest-dev mailing list