[TIP] Fwd: finalizing tox's new parametrized configuration (RFC)
holger krekel
holger at merlinux.eu
Fri Aug 8 05:46:19 PDT 2014
Hi Alex, (including your considerations to the list again),
On Fri, Aug 08, 2014 at 19:09 +0800, Alexander Schepanovski wrote:
> ---------- Forwarded message ----------
> From: Alexander Schepanovski <suor.web at gmail.com>
> Date: 2014-08-08 14:01 GMT+08:00
> Subject: Re: [TIP] finalizing tox's new parametrized configuration (RFC)
> To: "Masiar, Peter (PMASIAR)" <PMASIAR at arinc.com>
>
>
> Thinking about it a bit more, I came to a thought that me can solve
> problems with negation and its precedence by limiting its use. There are 2
> plausible approaches I see:
>
> 1. Do not allow negation at all. Will arguably make things more explicit
> and only a bit longer: "!py26" -> "py27,py33,py34", "py26-!django13" ->
> "py26-django{14,15,16}". This way factor lists will look exactly like
> envlist, which is a good thing, I think. I know negation is already
> supported, but it's not released so removing it will be backward compatible
> change.
I agree. Allowing the "generative" envlist syntax in the conditional
expression would help to live without negation.
> 2. Only allow negation outside "hyphenated words", negating the whole
> thing. This will make exceptions easier. As an added bonus we can use
> negations in envlist, meaning exceptions:
> py{26,27,33,34}-django{13,14,15,16,17},
> !py26-django17, # dropped python
> 2.6 support in django 1.7
> !py{33,34}-django{13,14} # python 3 supported
> since django 1.5
> Helps with non rectangular matrices.
>
> Both approaches forbid some very confusing constructs like "!py26-!py27".
> "py26-py27" is also confusing, but it makes no sense since factors from
> same set are mutually exclusive, while their negations are not.
>
> Also, second approach is a backward compatible extension of the first one,
> so we could start with a first and look if anyone will really need negation
> at all.
I agree. Let's remove negation and go for variant 1. for releasing tox-1.8.
When negation is really needed (haven't seen a real-life example yet) we can
think about the rules -- we could e.g. then require !(.*), i.e.
parentheses after "!" to make it clear and not require knowing about
precendence rules when reading a tox.ini.
best,
holger
More information about the testing-in-python
mailing list