<div dir="ltr"><div>&gt; Using the new syntax your tox.ini should collapse like this::</div><div>&gt; </div><div>&gt;     [tox]</div><div>&gt;     envlist = {py26,py27,py32,py33}-{1.4,1.5,1.6},</div><div>&gt;               {py27,py32,py33}-trunk,</div>
<div>&gt;               py27-1.5-nosouth</div><div>&gt;               </div><div>&gt;     [testenv]</div><div>&gt;     deps =</div><div>&gt;         coverage == 3.6</div><div>&gt;         1.4: Django == 1.4.10</div><div>&gt;         1.5: Django == 1.5.5</div>
<div>&gt;         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>&gt;         trunk: <a href="https://github.com/django/django/tarball/master">https://github.com/django/django/tarball/master</a></div>
<div>&gt;         1.4: South == 0.7.6</div><div>&gt;         1.5,1.6: South == 0.8.1</div><div>&gt; </div><div>&gt;     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 &quot;py{26,27,33,34}&quot; or &quot;{py26,py27,py33,py34}&quot; 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">&lt;<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>&gt;</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>
&gt; ---------- Forwarded message ----------<br>
&gt; From: Alexander Schepanovski &lt;<a href="mailto:suor.web@gmail.com">suor.web@gmail.com</a>&gt;<br>
&gt; Date: 2014-08-08 14:01 GMT+08:00<br>
&gt; Subject: Re: [TIP] finalizing tox&#39;s new parametrized configuration (RFC)<br>
&gt; To: &quot;Masiar, Peter (PMASIAR)&quot; &lt;<a href="mailto:PMASIAR@arinc.com">PMASIAR@arinc.com</a>&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thinking about it a bit more, I came to a thought that me can solve<br>
&gt; problems with negation and its precedence by limiting its use. There are 2<br>
&gt; plausible approaches I see:<br>
&gt;<br>
&gt; 1. Do not allow negation at all. Will arguably make things more explicit<br>
&gt; and only a bit longer: &quot;!py26&quot; -&gt; &quot;py27,py33,py34&quot;, &quot;py26-!django13&quot; -&gt;<br>
&gt; &quot;py26-django{14,15,16}&quot;. This way factor lists will look exactly like<br>
&gt; envlist, which is a good thing, I think. I know negation is already<br>
&gt; supported, but it&#39;s not released so removing it will be backward compatible<br>
&gt; change.<br>
<br>
</div>I agree.  Allowing the &quot;generative&quot; envlist syntax in the conditional<br>
expression would help to live without negation.<br>
<div class=""><br>
&gt; 2. Only allow negation outside &quot;hyphenated words&quot;, negating the whole<br>
&gt; thing. This will make exceptions easier. As an added bonus we can use<br>
&gt; negations in envlist, meaning exceptions:<br>
&gt;     py{26,27,33,34}-django{13,14,15,16,17},<br>
&gt;     !py26-django17,                                        # dropped python<br>
&gt; 2.6 support in django 1.7<br>
&gt;     !py{33,34}-django{13,14}                          # python 3 supported<br>
&gt; since django 1.5<br>
&gt; Helps with non rectangular matrices.<br>
&gt;<br>
&gt; Both approaches forbid some very confusing constructs like &quot;!py26-!py27&quot;.<br>
&gt; &quot;py26-py27&quot; is also confusing, but it makes no sense since factors from<br>
&gt; same set are mutually exclusive, while their negations are not.<br>
&gt;<br>
&gt; Also, second approach is a backward compatible extension of the first one,<br>
&gt; so we could start with a first and look if anyone will really need negation<br>
&gt; at all.<br>
<br>
</div>I agree.  Let&#39;s remove negation and go for variant 1. for releasing tox-1.8.<br>
When negation is really needed (haven&#39;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 &quot;!&quot; 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>