[pytest-dev] can we remove the deprecated pytest.config variable assignment before 3.0
holger krekel
holger at merlinux.eu
Wed Jul 20 15:50:41 EDT 2016
On Wed, Jul 20, 2016 at 16:15 +0000, Bruno Oliveira wrote:
> Hi Ronny,
>
> AFAIK there’s no simple way to workaround it, correct? For example, I
> believe there might be code out there using pytest.config as a conditional
> in a pytest.mark.skipif decorator. In this case the change is not a simple
> find/replace.
You can use string-evaluation to get access to pytest's config:
@pytest.mark.skipif("config.option.something == 'none'")
...
Are there occassions where pytest.config is used during import time?
Many of them?
FWIW it's in any case possible to provide a backward-compat plugin
which makes pytest.config available i guess.
holger
> As a general guideline for deprecation vs removal, IMHO we should weight
> the pain to users vs what simplifies maintenance burden for us. If the
> assignment is simple to maintain, I would prefer to deprecate it in 3.0 and
> remove it on 4.0.
>
> Cheers,
>
>
> On Wed, Jul 20, 2016 at 12:59 PM Ronny Pfannschmidt <rpfannsc at redhat.com>
> wrote:
>
> > Hi,
> >
> > while working on config.py
> >
> > i just noted we have that pytest.config assignment around in there for
> > compatibility
> > i'd like to remove it - and wonder if its something thats ok to slip into
> > 3.0 or if we should go for deprecation in the 3 series and removal in the 4
> > series?
> >
> > -- Ronny
> >
> > --
> >
> > Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
> > Commercial register: Amtsgericht Muenchen, HRB 153243,
> > Managing Directors: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander
> >
> > _______________________________________________
> > pytest-dev mailing list
> > pytest-dev at python.org
> > https://mail.python.org/mailman/listinfo/pytest-dev
> >
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
More information about the pytest-dev
mailing list