Hello community, here is the log from the commit of package python3-tox for openSUSE:Factory checked in at 2015-11-24 22:32:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python3-tox (Old) and /work/SRC/openSUSE:Factory/.python3-tox.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python3-tox" Changes: -------- --- /work/SRC/openSUSE:Factory/python3-tox/python3-tox.changes 2015-10-02 09:23:32.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python3-tox.new/python3-tox.changes 2015-11-24 22:32:29.000000000 +0100 @@ -1,0 +2,27 @@ +Sat Nov 14 20:34:44 UTC 2015 - arun@gmx.de + +- update to version 2.2.1: + * fix bug where {envdir} substitution could not be used in setenv if + that env value is then used in {basepython}. Thanks Florian + Bruhin. + +- changes from version 2.2.0: + * fix issue265 and add LD_LIBRARY_PATH to passenv on linux by + default because otherwise the python interpreter might not start + up in certain configurations (redhat software collections). + Thanks David Riddle. + * fix issue246: fix regression in config parsing by reordering such + that {envbindir} can be used again in tox.ini. Thanks Olli Walsh. + * fix issue99: the {env:...} substitution now properly uses + environment settings from the "setenv" section. Thanks Itxaka + Serrano. + * fix issue281: make --force-deps work when urls are present in + dependency configs. Thanks Glyph Lefkowitz for reporting. + * fix issue174: add new "ignore_outcome" testenv attribute which can + be set to True in which case it will produce a warning instead of + an error on a failed testenv command outcome. Thanks Rebecka + Gulliksson for the PR. + * fix issue280: properly skip missing interpreter if + {envsitepackagesdir} is present in commands. Thanks BB:ceridwenv + +------------------------------------------------------------------- Old: ---- tox-2.1.1.tar.gz New: ---- tox-2.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python3-tox.spec ++++++ --- /var/tmp/diff_new_pack.AsMMqw/_old 2015-11-24 22:32:30.000000000 +0100 +++ /var/tmp/diff_new_pack.AsMMqw/_new 2015-11-24 22:32:30.000000000 +0100 @@ -17,7 +17,7 @@ Name: python3-tox -Version: 2.1.1 +Version: 2.2.1 Release: 0 Summary: Virtualenv-based automation of test activities License: MIT ++++++ tox-2.1.1.tar.gz -> tox-2.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/CHANGELOG new/tox-2.2.1/CHANGELOG --- old/tox-2.1.1/CHANGELOG 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/CHANGELOG 2015-11-11 15:57:13.000000000 +0100 @@ -1,3 +1,34 @@ +2.2.1 +----- + +- fix bug where {envdir} substitution could not be used in setenv + if that env value is then used in {basepython}. Thanks Florian Bruhin. + +2.2.0 +----- + +- fix issue265 and add LD_LIBRARY_PATH to passenv on linux by default + because otherwise the python interpreter might not start up in + certain configurations (redhat software collections). Thanks David Riddle. + +- fix issue246: fix regression in config parsing by reordering + such that {envbindir} can be used again in tox.ini. Thanks Olli Walsh. + +- fix issue99: the {env:...} substitution now properly uses environment + settings from the ``setenv`` section. Thanks Itxaka Serrano. + +- fix issue281: make --force-deps work when urls are present in + dependency configs. Thanks Glyph Lefkowitz for reporting. + +- fix issue174: add new ``ignore_outcome`` testenv attribute which + can be set to True in which case it will produce a warning instead + of an error on a failed testenv command outcome. + Thanks Rebecka Gulliksson for the PR. + +- fix issue280: properly skip missing interpreter if + {envsitepackagesdir} is present in commands. Thanks BB:ceridwenv + + 2.1.1 ---------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/CONTRIBUTORS new/tox-2.2.1/CONTRIBUTORS --- old/tox-2.1.1/CONTRIBUTORS 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/CONTRIBUTORS 2015-11-11 15:57:13.000000000 +0100 @@ -31,3 +31,4 @@ Clark Boylan Eugene Yunak Mark Hirota +Itxaka Serrano diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/PKG-INFO new/tox-2.2.1/PKG-INFO --- old/tox-2.1.1/PKG-INFO 2015-06-23 12:30:42.000000000 +0200 +++ new/tox-2.2.1/PKG-INFO 2015-11-11 15:57:14.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tox -Version: 2.1.1 +Version: 2.2.1 Summary: virtualenv-based automation of test activities Home-page: http://tox.testrun.org/ Author: holger krekel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/doc/conf.py new/tox-2.2.1/doc/conf.py --- old/tox-2.1.1/doc/conf.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/doc/conf.py 2015-11-11 15:57:13.000000000 +0100 @@ -48,8 +48,8 @@ # built documents. # # The short X.Y version. -release = "2.1" -version = "2.1.0" +release = "2.2" +version = "2.2.0" # The full version, including alpha/beta/rc tags. # The language for content autogenerated by Sphinx. Refer to documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/doc/config.txt new/tox-2.2.1/doc/config.txt --- old/tox-2.1.1/doc/config.txt 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/doc/config.txt 2015-11-11 15:57:13.000000000 +0100 @@ -302,6 +302,15 @@ **default**: ``False`` +.. confval:: ignore_outcome=BOOL + + .. versionadded:: 2.2 + + If set to True a failing result of this testenv will not make tox fail, + only a warning will be produced. + + **default**: ``False`` + Substitutions ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/setup.cfg new/tox-2.2.1/setup.cfg --- old/tox-2.1.1/setup.cfg 2015-06-23 12:30:42.000000000 +0200 +++ new/tox-2.2.1/setup.cfg 2015-11-11 15:57:14.000000000 +0100 @@ -1,6 +1,17 @@ +[build_sphinx] +source-dir = doc/en/ +build-dir = doc/build +all_files = 1 + +[upload_sphinx] +upload-dir = doc/en/build/html + [bdist_wheel] universal = 1 +[devpi:upload] +formats = sdist.tgz,bdist_wheel + [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/setup.py new/tox-2.2.1/setup.py --- old/tox-2.1.1/setup.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/setup.py 2015-11-11 15:57:13.000000000 +0100 @@ -48,7 +48,7 @@ description='virtualenv-based automation of test activities', long_description=open("README.rst").read(), url='http://tox.testrun.org/', - version='2.1.1', + version='2.2.1', license='http://opensource.org/licenses/MIT', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tests/test_config.py new/tox-2.2.1/tests/test_config.py --- old/tox-2.1.1/tests/test_config.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tests/test_config.py 2015-11-11 15:57:13.000000000 +0100 @@ -88,6 +88,26 @@ 'dep1==1.5', 'dep2==2.1', 'dep3==3.0', 'dep4==4.0', ] + def test_force_dep_with_url(self, initproj): + initproj("example123-0.5", filedefs={ + 'tox.ini': ''' + [tox] + + [testenv] + deps= + dep1==1.0 + https://pypi.python.org/xyz/pkg1.tar.gz + ''' + }) + config = parseconfig( + ['--force-dep=dep1==1.5']) + assert config.option.force_dep == [ + 'dep1==1.5' + ] + assert [str(x) for x in config.envconfigs['python'].deps] == [ + 'dep1==1.5', 'https://pypi.python.org/xyz/pkg1.tar.gz' + ] + def test_is_same_dep(self): """ Ensure correct parseini._is_same_dep is working with a few samples. @@ -254,6 +274,28 @@ ["echo", "cmd", "1", "2", "3", "4", "cmd", "2"], ] + def test_command_env_substitution(self, newconfig): + """Ensure referenced {env:key:default} values are substituted correctly.""" + config = newconfig(""" + [testenv:py27] + setenv = + TEST=testvalue + commands = + ls {env:TEST} + """) + reader = SectionReader("testenv:py27", config._cfg) + x = reader.getargvlist("commands") + assert x == [ + "ls testvalue".split() + ] + assert x != [ + "ls {env:TEST}".split() + ] + y = reader.getargvlist("setenv") + assert y == [ + "TEST=testvalue".split() + ] + class TestIniParser: def test_getstring_single(self, tmpdir, newconfig): @@ -598,6 +640,7 @@ int_hashseed = int(hashseed) # hashseed is random by default, so we can't assert a specific value. assert int_hashseed > 0 + assert envconfig.ignore_outcome is False def test_sitepackages_switch(self, tmpdir, newconfig): config = newconfig(["--sitepackages"], "") @@ -695,6 +738,32 @@ assert envconfig.setenv['PYTHONPATH'] == 'something' assert envconfig.setenv['ANOTHER_VAL'] == 'else' + def test_setenv_with_envdir_and_basepython(self, tmpdir, newconfig): + config = newconfig(""" + [testenv] + setenv = + VAL = {envdir} + basepython = {env:VAL} + """) + assert len(config.envconfigs) == 1 + envconfig = config.envconfigs['python'] + assert 'VAL' in envconfig.setenv + assert envconfig.setenv['VAL'] == envconfig.envdir + assert envconfig.basepython == envconfig.envdir + + def test_setenv_ordering_1(self, tmpdir, newconfig): + config = newconfig(""" + [testenv] + setenv= + VAL={envdir} + commands=echo {env:VAL} + """) + assert len(config.envconfigs) == 1 + envconfig = config.envconfigs['python'] + assert 'VAL' in envconfig.setenv + assert envconfig.setenv['VAL'] == envconfig.envdir + assert str(envconfig.envdir) in envconfig.commands[0] + @pytest.mark.parametrize("plat", ["win32", "linux2"]) def test_passenv_as_multiline_list(self, tmpdir, newconfig, monkeypatch, plat): monkeypatch.setattr(sys, "platform", plat) @@ -721,6 +790,7 @@ assert "PATH" in envconfig.passenv assert "PIP_INDEX_URL" in envconfig.passenv assert "LANG" in envconfig.passenv + assert "LD_LIBRARY_PATH" in envconfig.passenv assert "A123A" in envconfig.passenv assert "A123B" in envconfig.passenv @@ -926,6 +996,18 @@ assert argv[7][0] == config.homedir.join(".tox", "distshare") assert argv[8][0] == conf.envlogdir + def test_substitution_notfound_issue246(tmpdir, newconfig): + config = newconfig(""" + [testenv:py27] + setenv = + FOO={envbindir} + BAR={envsitepackagesdir} + """) + conf = config.envconfigs['py27'] + env = conf.setenv + assert 'FOO' in env + assert 'BAR' in env + def test_substitution_positional(self, newconfig): inisource = """ [testenv:py27] @@ -1214,6 +1296,14 @@ assert [d.name for d in configs["py27-django1.6"].deps] \ == ["Django==1.6"] + def test_ignore_outcome(self, newconfig): + inisource = """ + [testenv] + ignore_outcome=True + """ + config = newconfig([], inisource).envconfigs + assert config["python"].ignore_outcome is True + class TestGlobalOptions: def test_notest(self, newconfig): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tests/test_venv.py new/tox-2.2.1/tests/test_venv.py --- old/tox-2.1.1/tests/test_venv.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tests/test_venv.py 2015-11-11 15:57:13.000000000 +0100 @@ -7,6 +7,7 @@ from tox.venv import * # noqa from tox.interpreters import NoInterpreterInfo + # def test_global_virtualenv(capfd): # v = VirtualEnv() # l = v.list() @@ -611,3 +612,17 @@ x4 = venv.getcommandpath("x", cwd=tmpdir) assert x4.endswith(os.sep + 'x') mocksession.report.expect("warning", "*test command found but not*") + + +def test_ignore_outcome_failing_cmd(newmocksession): + mocksession = newmocksession([], """ + [testenv] + commands=testenv_fail + ignore_outcome=True + """) + + venv = mocksession.getenv('python') + venv.test() + assert venv.status == "ignored failed command" + mocksession.report.expect("warning", "*command failed but result from " + "testenv is ignored*") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tests/test_z_cmdline.py new/tox-2.2.1/tests/test_z_cmdline.py --- old/tox-2.1.1/tests/test_z_cmdline.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tests/test_z_cmdline.py 2015-11-11 15:57:13.000000000 +0100 @@ -692,8 +692,7 @@ assert sdist_path == p -@pytest.mark.xfail("sys.platform == 'win32' and sys.version_info < (2,6)", - reason="test needs better impl") +@pytest.mark.xfail("sys.platform == 'win32'", reason="test needs better impl") def test_envsitepackagesdir(cmd, initproj): initproj("pkg512-0.0.5", filedefs={ 'tox.ini': """ @@ -708,6 +707,22 @@ """) +@pytest.mark.xfail("sys.platform == 'win32'", reason="test needs better impl") +def test_envsitepackagesdir_skip_missing_issue280(cmd, initproj): + initproj("pkg513-0.0.5", filedefs={ + 'tox.ini': """ + [testenv] + basepython=/usr/bin/qwelkjqwle + commands= + {envsitepackagesdir} + """}) + result = cmd.run("tox", "--skip-missing-interpreters") + assert result.ret == 0 + result.stdout.fnmatch_lines(""" + SKIPPED:*qwelkj* + """) + + def verify_json_report_format(data, testenvs=True): assert data["reportversion"] == "1" assert data["toxversion"] == tox.__version__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tox/__init__.py new/tox-2.2.1/tox/__init__.py --- old/tox-2.1.1/tox/__init__.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tox/__init__.py 2015-11-11 15:57:13.000000000 +0100 @@ -1,5 +1,5 @@ # -__version__ = '2.1.1' +__version__ = '2.2.1' from .hookspecs import hookspec, hookimpl # noqa diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tox/config.py new/tox-2.2.1/tox/config.py --- old/tox-2.1.1/tox/config.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tox/config.py 2015-11-11 15:57:13.000000000 +0100 @@ -141,7 +141,11 @@ same package, even if versions differ. """ dep1_name = pkg_resources.Requirement.parse(dep1).project_name - dep2_name = pkg_resources.Requirement.parse(dep2).project_name + try: + dep2_name = pkg_resources.Requirement.parse(dep2).project_name + except pkg_resources.RequirementParseError: + # we couldn't parse a version, probably a URL + return False return dep1_name == dep2_name @@ -320,11 +324,23 @@ help="additional arguments available to command positional substitution") # add various core venv interpreter attributes - parser.add_testenv_attribute( name="envdir", type="path", default="{toxworkdir}/{envname}", help="venv directory") + def basepython_default(testenv_config, value): + if value is None: + for f in testenv_config.factors: + if f in default_factors: + return default_factors[f] + return sys.executable + return str(value) + + parser.add_testenv_attribute( + name="basepython", type="string", default=None, postprocess=basepython_default, + help="executable name or path of interpreter used to create a " + "virtual test environment.") + parser.add_testenv_attribute( name="envtmpdir", type="path", default="{envdir}/tmp", help="venv temporary directory") @@ -386,7 +402,7 @@ itertools.chain.from_iterable( [x.split(' ') for x in value])) - passenv = set(["PATH", "PIP_INDEX_URL", "LANG"]) + passenv = set(["PATH", "PIP_INDEX_URL", "LANG", "LD_LIBRARY_PATH"]) # read in global passenv settings p = os.environ.get("TOX_TESTENV_PASSENV", None) @@ -453,19 +469,6 @@ name="usedevelop", type="bool", postprocess=develop, default=False, help="install package in develop/editable mode") - def basepython_default(testenv_config, value): - if value is None: - for f in testenv_config.factors: - if f in default_factors: - return default_factors[f] - return sys.executable - return str(value) - - parser.add_testenv_attribute( - name="basepython", type="string", default=None, postprocess=basepython_default, - help="executable name or path of interpreter used to create a " - "virtual test environment.") - parser.add_testenv_attribute_obj(InstallcmdOption()) parser.add_testenv_attribute_obj(DepOption()) @@ -473,6 +476,11 @@ name="commands", type="argvlist", default="", help="each line specifies a test command and can use substitution.") + parser.add_testenv_attribute( + "ignore_outcome", type="bool", default=False, + help="if set to True a failing result of this testenv will not make " + "tox fail, only a warning will be produced") + class Config(object): """ Global Tox config object. """ @@ -531,7 +539,6 @@ """ return sitepackagesdir of the virtualenv environment. (only available during execution, not parsing) """ - self.getsupportedinterpreter() # for throwing exceptions x = self.config.interpreters.get_sitepackagesdir( info=self.python_info, envdir=self.envdir) @@ -709,7 +716,7 @@ if atype == "path": reader.addsubstitutions(**{env_attr.name: res}) - if env_attr.name == "install_command": + if env_attr.name == "basepython": reader.addsubstitutions(envbindir=vc.envbindir, envpython=vc.envpython, envsitepackagesdir=vc.envsitepackagesdir) return vc @@ -903,6 +910,7 @@ return '\n'.join(filter(None, map(factor_line, lines))) def _replace_env(self, match): + env_list = self.getdict('setenv') match_value = match.group('substitution_value') if not match_value: raise tox.exception.ConfigError( @@ -917,11 +925,14 @@ envkey = match_value if envkey not in os.environ and default is None: - raise tox.exception.ConfigError( - "substitution env:%r: unknown environment variable %r" % - (envkey, envkey)) - - return os.environ.get(envkey, default) + if envkey not in env_list and default is None: + raise tox.exception.ConfigError( + "substitution env:%r: unknown environment variable %r" % + (envkey, envkey)) + if envkey in os.environ: + return os.environ.get(envkey, default) + else: + return env_list.get(envkey, default) def _substitute_from_other_section(self, key): if key.startswith("[") and "]" in key: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tox/session.py new/tox-2.2.1/tox/session.py --- old/tox-2.1.1/tox/session.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tox/session.py 2015-11-11 15:57:13.000000000 +0100 @@ -570,6 +570,9 @@ elif status == "platform mismatch": msg = " %s: %s" % (venv.envconfig.envname, str(status)) self.report.skip(msg) + elif status and status == "ignored failed command": + msg = " %s: %s" % (venv.envconfig.envname, str(status)) + self.report.good(msg) elif status and status != "skipped tests": msg = " %s: %s" % (venv.envconfig.envname, str(status)) self.report.error(msg) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tox/venv.py new/tox-2.2.1/tox/venv.py --- old/tox-2.1.1/tox/venv.py 2015-06-23 12:30:41.000000000 +0200 +++ new/tox-2.2.1/tox/venv.py 2015-11-11 15:57:13.000000000 +0100 @@ -351,6 +351,13 @@ self._pcall(argv, cwd=cwd, action=action, redirect=redirect, ignore_ret=ignore_ret, testcommand=True) except tox.exception.InvocationError as err: + if self.envconfig.ignore_outcome: + self.session.report.warning( + "command failed but result from testenv is ignored\n" + " cmd: %s" % (str(err),)) + self.status = "ignored failed command" + continue # keep processing commands + self.session.report.error(str(err)) self.status = "commands failed" if not self.envconfig.ignore_errors: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tox-2.1.1/tox.egg-info/PKG-INFO new/tox-2.2.1/tox.egg-info/PKG-INFO --- old/tox-2.1.1/tox.egg-info/PKG-INFO 2015-06-23 12:30:42.000000000 +0200 +++ new/tox-2.2.1/tox.egg-info/PKG-INFO 2015-11-11 15:57:14.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: tox -Version: 2.1.1 +Version: 2.2.1 Summary: virtualenv-based automation of test activities Home-page: http://tox.testrun.org/ Author: holger krekel