<div dir="ltr"><div>> Using the new syntax your tox.ini should collapse like this::</div><div>> </div><div>> [tox]</div><div>> envlist = {py26,py27,py32,py33}-{1.4,1.5,1.6},</div><div>> {py27,py32,py33}-trunk,</div>
<div>> py27-1.5-nosouth</div><div>> </div><div>> [testenv]</div><div>> deps =</div><div>> coverage == 3.6</div><div>> 1.4: Django == 1.4.10</div><div>> 1.5: Django == 1.5.5</div>
<div>> 1.6: <a href="https://github.com/django/django/tarball/stable/1.6.x">https://github.com/django/django/tarball/stable/1.6.x</a></div><div>> trunk: <a href="https://github.com/django/django/tarball/master">https://github.com/django/django/tarball/master</a></div>
<div>> 1.4: South == 0.7.6</div><div>> 1.5,1.6: South == 0.8.1</div><div>> </div><div>> commands = coverage run -a setup.py test</div><div><br></div><div>There is one nuance here not covered: South==0.8.1 will be installed for py27-1.5-nosouth. To handle that one could change last deps line to:</div>
<div><br></div><div> 1.5-!nosouth,1.6: South == 0.8.1</div><div><br></div><div>(Neither AND with -, nor negation inside an expression are implemented yet)</div><div><br></div><div>However, negation could lead to confusion I told about earlier, so we (me and Holger) are agreed to exclude it for now. Without using negation this could be written as:</div>
<div><br></div><div><div> [tox]</div><div> envlist = {py26,py27,py32,py33}-{1.4,1.5,1.6}-south,</div><div> {py27,py32,py33}-trunk-south,</div><div> py27-1.5-nosouth</div><div> </div>
<div> [testenv]</div><div> deps =</div><div> ...</div><div> {1.5,1.6}-south: South == 0.8.1</div><div><br></div></div><div>Also note that {,,} is expansion not OR, so you could equally write "py{26,27,33,34}" or "{py26,py27,py33,py34}" both in envlist and in factor expression.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-08 20:46 GMT+08:00 holger krekel <span dir="ltr"><<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Alex, (including your considerations to the list again),<br>
<div class=""><br>
On Fri, Aug 08, 2014 at 19:09 +0800, Alexander Schepanovski wrote:<br>
<br>
> ---------- Forwarded message ----------<br>
> From: Alexander Schepanovski <<a href="mailto:suor.web@gmail.com">suor.web@gmail.com</a>><br>
> Date: 2014-08-08 14:01 GMT+08:00<br>
> Subject: Re: [TIP] finalizing tox's new parametrized configuration (RFC)<br>
> To: "Masiar, Peter (PMASIAR)" <<a href="mailto:PMASIAR@arinc.com">PMASIAR@arinc.com</a>><br>
><br>
><br>
> Thinking about it a bit more, I came to a thought that me can solve<br>
> problems with negation and its precedence by limiting its use. There are 2<br>
> plausible approaches I see:<br>
><br>
> 1. Do not allow negation at all. Will arguably make things more explicit<br>
> and only a bit longer: "!py26" -> "py27,py33,py34", "py26-!django13" -><br>
> "py26-django{14,15,16}". This way factor lists will look exactly like<br>
> envlist, which is a good thing, I think. I know negation is already<br>
> supported, but it's not released so removing it will be backward compatible<br>
> change.<br>
<br>
</div>I agree. Allowing the "generative" envlist syntax in the conditional<br>
expression would help to live without negation.<br>
<div class=""><br>
> 2. Only allow negation outside "hyphenated words", negating the whole<br>
> thing. This will make exceptions easier. As an added bonus we can use<br>
> negations in envlist, meaning exceptions:<br>
> py{26,27,33,34}-django{13,14,15,16,17},<br>
> !py26-django17, # dropped python<br>
> 2.6 support in django 1.7<br>
> !py{33,34}-django{13,14} # python 3 supported<br>
> since django 1.5<br>
> Helps with non rectangular matrices.<br>
><br>
> Both approaches forbid some very confusing constructs like "!py26-!py27".<br>
> "py26-py27" is also confusing, but it makes no sense since factors from<br>
> same set are mutually exclusive, while their negations are not.<br>
><br>
> Also, second approach is a backward compatible extension of the first one,<br>
> so we could start with a first and look if anyone will really need negation<br>
> at all.<br>
<br>
</div>I agree. Let's remove negation and go for variant 1. for releasing tox-1.8.<br>
When negation is really needed (haven't seen a real-life example yet) we can<br>
think about the rules -- we could e.g. then require !(.*), i.e.<br>
parentheses after "!" to make it clear and not require knowing about<br>
precendence rules when reading a tox.ini.<br>
<br>
best,<br>
holger<br>
</blockquote></div><br></div>