[pytest-dev] deprecating `pytest_plugins` in non-initial conftests to prevent unintended smear/spill of plugin configurations

Bruno Oliveira nicoddemus at gmail.com
Wed Oct 25 17:25:34 EDT 2017


On Wed, Oct 25, 2017 at 6:01 PM Floris Bruynooghe <flub at devork.be> wrote:

> > as such i propose deprecating them and warning users about the problems
> > with regard to when and how to warn we need to take a look in detail as
> > there are many reasonably valid setups with exactly one non initial
> conftest
> > and we should help people to turn those into initial conftest's while
> > cleaning out the rest.
>
> Absolutely, if we can detect this and warn users away from it then
> that sounds great.  It could go on the "removal in 4.0" list if such a
> list existed.
>

Agreed. We should be able to detect a pytest_plugins directive in
non-initial conftest files fairly easily and issue a warning if that's the
case.

We have a deprecation list:
https://github.com/pytest-dev/pytest/wiki/Deprecation-Roadmap

Cheers,
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20171025/f480cbf6/attachment.html>


More information about the pytest-dev mailing list