<div dir="ltr">I am late to the party, and I guess it is too late, but I am not convinced this is a good idea, at least not as a default (should be opt-in, not opt-out).<div><br></div><div>This breaks a lot of basic features, in a way that is fairly complicated to debug. E.g. with tox 2.0, os.path.expanduser(&quot;~&quot;) is now broken on windows because e.g. USERNAME is not propagated. Realistically, way too many programs depend on various environment variables.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 19, 2015 at 4:31 PM, holger krekel <span dir="ltr">&lt;<a href="mailto:holger@merlinux.eu" target="_blank">holger@merlinux.eu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi tox users,<br>
<br>
for tox-2.0 i&#39;d like to introduce environment variable isolation.  The<br>
idea is that only a minimal default set of environment variables is<br>
transferred to the test environment in contrast to the tox&lt;2.0 where<br>
all environment variables are copied to the test run.  With tox-2.0 one<br>
can thus make sure tests don&#39;t depend on random env variables but only<br>
those which are specified with tox.ini.<br>
<br>
If you want to transfer any other variables you&#39;d have to use a new &quot;passenv&quot;<br>
setting.  For example to pass through the content of LANG (used for locale settings)<br>
and typical home-directory settings (on win32 and unix):<br>
<br>
    [testenv]<br>
    passenv = LANG HOME HOMEDIR HOMEDRIVE<br>
<br>
If an env variable does not exist it is ignored, remains unset in the test run.<br>
This allows to uncover hidden envvar dependencies and explicitely control them.<br>
FYI you can today already use the &quot;setenv&quot; option to specify env vars::<br>
<br>
    [testenv]<br>
    setenv =<br>
        MYENV = somesetting<br>
<br>
But there is no way to prevent/exclude env variables to be copied to the test run<br>
from the environment variable set with which you invoke tox.<br>
<br>
For a somewhat smoother transition it might make sense to default to the<br>
old behaviour (transfer all env variables) with tox-2.0.X and assume passenv<br>
transfers all variables via a default &quot;*&quot; setting but issue a warning<br>
and with tox-2.1 then default to an empty passenv setting.<br>
<br>
comments welcome,<br>
holger<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
about me:    <a href="http://holgerkrekel.net/about-me/" target="_blank">http://holgerkrekel.net/about-me/</a><br>
contracting: <a href="http://merlinux.eu" target="_blank">http://merlinux.eu</a><br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</font></span></blockquote></div><br></div>