From commits-noreply at bitbucket.org Tue Feb 12 11:37:07 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 12 Feb 2013 10:37:07 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20130212103707.8483.46378@bitbucket22.managed.contegix.com> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/413cd4cd876a/ changeset: 413cd4cd876a user: hpk42 date: 2013-02-12 11:35:57 summary: refining multi-dimensional tox support affected #: 1 file diff -r 33d2d5195d8234db4c1d2e801e1f443611edd576 -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 doc/config-v2.txt --- a/doc/config-v2.txt +++ b/doc/config-v2.txt @@ -55,14 +55,14 @@ with testenvs - allow platform-specific settings - allow to specify platforms against which tests should run -- allow to run installer-variants (easy_install or pip) +- allow to run installer-variants (easy_install or pip, xxx) - try to mimick/re-use bash-style syntax to ease learning curve. Example: Generating and selecting variants ---------------------------------------------- -Suppose you want to test your package python2.6, python2.7 and on the +Suppose you want to test your package against python2.6, python2.7 and on the windows and linux platforms. Today you would have to write down 2*2 = 4 ``[testenv:*]`` sections and then instruct tox to run a specific list of environments on each platform. @@ -71,7 +71,7 @@ # combination syntax gives 2 * 2 = 4 testenv names # - envlist = {py26,py27}-{win,linux}, {py31,py32}-linux + envlist = {py26,py27}-{win,linux} [testenv] deps = pytest @@ -101,12 +101,6 @@ windows: windows linux: linux -With - -ConcretelyThe next configuration item defines the platform, depending on the -environment name for which the ``[testenv]`` is used:: - - These two conditional settings will lead to either ``windows`` or ``linux`` as the platform string. When the test environment is run, its platform string needs to be contained in the string returned @@ -143,18 +137,6 @@ Voila, this multi-dimensional ``tox.ini`` configuration defines 2*2=4 environments. -Adding mypkg13,mypkg14 dependency variants --------------------------------------------- - -XXX -This defines an unconditional dependency ``pytest`` which is going to be -installed in all environments. It also defines two conditional dependencies: - -- if ``mypkg13`` is part of the environment name, the ``mypkg<1.4`` spec - will be used, otherwise the line is empty. -- if ``mypkg14`` is part of the environment name, the ``mypkg>=1.4,<1.5`` spec - will be used, otherwise the line is empty. - The new "platform" setting -------------------------------------- @@ -179,18 +161,7 @@ Parts of an environment name are obtained by ``-``-splitting it. Variant specification with [variant:VARNAME] ----------------------------------------------- -Apart from using conditional settings, you can also write down -a ``[variant::VARIANTNAME]`` section, allowing to define settings -for the respective variant. Variant settings will be merged from -left to right so an environment name ``abc-def`` will lookup -and merge settings from ``abc``, then from ``def``. - -.. - Note that a direct ``[variant:xyz-abc]`` testenv definition - can override any automatically produced settings. - Showing all expanded sections ------------------------------- @@ -253,30 +224,27 @@ envlist = {py25,py26,py27}-{django12,django13}{,-example} [testenv] - commands = python setup.py test deps= coverage==3.4 unittest-xml-reporting==1.2 Pyyaml==3.10 django12: django==1.2.4 django13: django==1.3.1 + # some more deps for running examples + example: wsgiref==0.1.2 + example: Pygments==1.4 + example: httplib2==0.6.0 + example: Markdown==2.0.3 + + commands = + !example: python setup.py test + example: python examples/runtests.py + - [envpart:example] - commands = python examples/runtests.py - +deps = - wsgiref==0.1.2 - Pygments==1.4 - httplib2==0.6.0 - Markdown==2.0.3 - -Note that ``{,-example}`` in the envlist denotes an empty env and the -"example" envpart. The empty envpart means that there are no specific +Note that ``{,-example}`` in the envlist denotes two values, an empty +one and a ``example`` one. The empty value means that there are no specific settings and thus no need to define a variant name. -Note also that ``+deps`` means that we are appending to dependencies, -not substituting them. - - Transforming the examples: django-treebeard ------------------------------------------------ @@ -289,10 +257,9 @@ we also produce 36 specific testenvs with specific dependencies and test commands:: - [tox] - envlist = - [py24,py25,py26,py27]-[django11,django12,django13]-[nodb,pg,mysql] - docs + [tox] + envlist = + {py24,py25,py26,py27}-{django11,django12,django13}-{nodb,pg,mysql}, docs [testenv:docs] changedir = docs @@ -323,8 +290,3 @@ mysql: {envpython} runtests.py --DATABASE_ENGINE=mysql \ --DATABASE_USER=root {posargs} -It's noteworthy here that you can also use conditionals in the commands. - - - - https://bitbucket.org/hpk42/tox/commits/a77eb52145e2/ changeset: a77eb52145e2 user: hpk42 date: 2013-02-12 11:36:52 summary: fix downloadcache determination to work according to docs: Only make pip use a download cache if PIP_DOWNLOAD_CACHE or a downloadcache=PATH testenv setting is present. (The ENV setting takes precedence) affected #: 8 files diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ 1.4.3.dev ----------------- +- fix downloadcache determination to work according to docs: Only + make pip use a download cache if PIP_DOWNLOAD_CACHE or a + downloadcache=PATH testenv setting is present. (The ENV setting + takes precedence) + - experimentally introduce --installpkg=PATH option to install a package rather than create/install an sdist package. This will still require and use tox.ini and tests from the current working dir (and not from the remote diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 doc/config.txt --- a/doc/config.txt +++ b/doc/config.txt @@ -106,8 +106,9 @@ .. confval:: downloadcache=path - (pip only) use this directory for caching downloads - this defaults to the - environment variable ``PIP_DOWNLOAD_CACHE`` if it is set. + (pip only) use this directory for caching downloads. This value + is overriden by the environment variable ``PIP_DOWNLOAD_CACHE`` + if it exists. **default**: no download cache will be used. **note**: if creating multiple environments use of a download cache greatly speeds up the testing process. diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 setup.py --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ description='virtualenv-based automation of test activities', long_description=long_description, url='http://tox.testrun.org/', - version='1.4.3.dev5', + version='1.4.3.dev6', license='GPLv2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 tests/test_venv.py --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -25,6 +25,7 @@ assert args[1] == '-c' # Return value needs to actually exist! return sys.executable + @staticmethod def ret_pseudopy(name): assert name == 'py' return PseudoPy() @@ -162,13 +163,18 @@ assert l[1].cwd == venv.envconfig.envlogdir assert "pip" in str(args[0]) assert args[1] == "install" - arg = "--download-cache=" + str(venv.envconfig.downloadcache) - assert arg in args[2:] + #arg = "--download-cache=" + str(venv.envconfig.downloadcache) + #assert arg in args[2:] args = [arg for arg in args if str(arg).endswith("dep1-1.1.zip")] assert len(args) == 1 -def test_install_downloadcache(newmocksession): + at pytest.mark.parametrize("envdc", [True, False]) +def test_install_downloadcache(newmocksession, monkeypatch, tmpdir, envdc): + if envdc: + monkeypatch.setenv("PIP_DOWNLOAD_CACHE", tmpdir) + else: + monkeypatch.delenv("PIP_DOWNLOAD_CACHE", raising=False) mocksession = newmocksession([], """ [testenv:py123] distribute=True @@ -187,8 +193,10 @@ assert l[1].cwd == venv.envconfig.envlogdir assert "pip" in str(args[0]) assert args[1] == "install" - arg = "--download-cache=" + str(venv.envconfig.downloadcache) - assert arg in args[2:] + if envdc: + assert venv.envconfig.downloadcache == tmpdir + else: + assert not venv.envconfig.downloadcache assert "dep1" in args assert "dep2" in args deps = list(filter(None, [x[1] for x in venv._getliveconfig().deps])) diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.4.3.dev5' +__version__ = '1.4.3.dev6' class exception: class Error(Exception): diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -298,12 +298,12 @@ vc.deps.append(DepConfig(name, ixserver)) vc.distribute = reader.getbool(section, "distribute", True) vc.sitepackages = reader.getbool(section, "sitepackages", False) - downloadcache = reader.getdefault(section, "downloadcache") - if downloadcache is None: - downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", "") - if not downloadcache: - downloadcache = self.config.toxworkdir.join("_download") - vc.downloadcache = py.path.local(downloadcache) + vc.downloadcache = None + downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", None) + if not downloadcache: + downloadcache = reader.getdefault(section, "downloadcache") + if downloadcache: + vc.downloadcache = py.path.local(downloadcache) return vc def _getenvlist(self, reader, toxsection): diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 tox/_pytestplugin.py --- a/tox/_pytestplugin.py +++ b/tox/_pytestplugin.py @@ -269,7 +269,7 @@ ''' % locals()}) if name not in filedefs: create_files(base, {name: - {'__init__.py': '__version__ = %s' % version}}) + {'__init__.py': '__version__ = %r' % version}}) manifestlines = [] for p in base.visit(lambda x: x.check(file=1)): manifestlines.append("include %s" % p.relto(base)) diff -r 413cd4cd876a739a2901d259aa8e38b0ba8f59c6 -r a77eb52145e259314a341222866c3e6806024a15 toxbootstrap.py --- a/toxbootstrap.py +++ b/toxbootstrap.py @@ -58,7 +58,7 @@ """ -__version__ = '1.4.3.dev5' +__version__ = '1.4.3.dev6' import sys import os Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Feb 14 13:17:14 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Thu, 14 Feb 2013 12:17:14 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: update changelog Message-ID: <20130214121714.5300.87112@bitbucket02.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/f22b64ce8116/ changeset: f22b64ce8116 user: RonnyPfannschmidt date: 2013-02-14 13:17:05 summary: update changelog affected #: 1 file diff -r 7c82f49f0d4519c8f67374b7a853aef1942a76fe -r f22b64ce811696019b7aea864e7d8bb44f965ce7 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -31,6 +31,8 @@ - issue 260 - don't use nose special setup on plain unittest cases +- fix issue134 - print the collect errors that prevent running specified test items + Changes between 2.3.3 and 2.3.4 ----------------------------------- Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Feb 14 14:15:36 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Thu, 14 Feb 2013 13:15:36 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: fix typo in link Message-ID: <20130214131536.18623.49593@bitbucket23.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/62984b8b62e8/ changeset: 62984b8b62e8 user: RonnyPfannschmidt date: 2013-02-14 14:15:13 summary: fix typo in link affected #: 1 file diff -r f22b64ce811696019b7aea864e7d8bb44f965ce7 -r 62984b8b62e8bfe8840fe1fe5c8751f04d1edce4 doc/en/index.txt --- a/doc/en/index.txt +++ b/doc/en/index.txt @@ -4,7 +4,7 @@ pytest: helps you write better programs ============================================= -.. note:: Upcoming: `professional testing with pytest and tox <`http://www.python-academy.com/courses/specialtopics/python_course_testing.html>`_ , 24th-26th June 2013, Leipzig. +.. note:: Upcoming: `professional testing with pytest and tox `_ , 24th-26th June 2013, Leipzig. **a mature full-featured Python testing tool** Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Feb 15 10:18:26 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Fri, 15 Feb 2013 09:18:26 -0000 Subject: [Pytest-commit] commit/pytest: RonnyPfannschmidt: fix issue 251 - report a skip instead of ignoring classes with init Message-ID: <20130215091826.8160.32751@bitbucket15.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/18234e3726bf/ changeset: 18234e3726bf user: RonnyPfannschmidt date: 2013-02-15 10:18:00 summary: fix issue 251 - report a skip instead of ignoring classes with init affected #: 3 files diff -r 62984b8b62e8bfe8840fe1fe5c8751f04d1edce4 -r 18234e3726bf090183d0cf7cc76c58ac89c179fb CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ Changes between 2.3.4 and 2.3.5dev ----------------------------------- +- issue 251 - report a skip instead of ignoring classes with init - issue250 unicode/str mixes in parametrization names and values now works diff -r 62984b8b62e8bfe8840fe1fe5c8751f04d1edce4 -r 18234e3726bf090183d0cf7cc76c58ac89c179fb _pytest/python.py --- a/_pytest/python.py +++ b/_pytest/python.py @@ -175,9 +175,8 @@ #if hasattr(collector.obj, 'unittest'): # return # we assume it's a mixin class for a TestCase derived one if collector.classnamefilter(name): - if not hasinit(obj): - Class = collector._getcustomclass("Class") - return Class(name, parent=collector) + Class = collector._getcustomclass("Class") + return Class(name, parent=collector) elif collector.funcnamefilter(name) and hasattr(obj, '__call__'): if is_generator(obj): return Generator(name, parent=collector) @@ -394,6 +393,11 @@ class Class(PyCollector): """ Collector for test methods. """ def collect(self): + if hasinit(self.obj): + pytest.skip("class %s.%s with __init__ won't get collected" % ( + self.obj.__module__, + self.obj.__name__, + )) return [self._getcustomclass("Instance")(name="()", parent=self)] def setup(self): diff -r 62984b8b62e8bfe8840fe1fe5c8751f04d1edce4 -r 18234e3726bf090183d0cf7cc76c58ac89c179fb testing/python/collect.py --- a/testing/python/collect.py +++ b/testing/python/collect.py @@ -35,7 +35,7 @@ pytest.raises(ImportError, "modcol.obj") class TestClass: - def test_class_with_init_not_collected(self, testdir): + def test_class_with_init_skip_collect(self, testdir): modcol = testdir.getmodulecol(""" class TestClass1: def __init__(self): @@ -45,7 +45,10 @@ pass """) l = modcol.collect() - assert len(l) == 0 + assert len(l) == 2 + + for classcol in l: + pytest.raises(pytest.skip.Exception, classcol.collect) def test_class_subclassobject(self, testdir): testdir.getmodulecol(""" Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Feb 15 12:48:00 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Fri, 15 Feb 2013 11:48:00 -0000 Subject: [Pytest-commit] commit/pytest: flub: Allow MarkEvaluator expressions to be unicode Message-ID: <20130215114800.32493.49023@bitbucket16.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/e2b3cb8add41/ changeset: e2b3cb8add41 user: flub date: 2013-02-15 12:47:48 summary: Allow MarkEvaluator expressions to be unicode This fixes issue #266. affected #: 2 files diff -r 18234e3726bf090183d0cf7cc76c58ac89c179fb -r e2b3cb8add4138967f980de01ccaf99673cf8be7 _pytest/skipping.py --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -3,6 +3,12 @@ import py, pytest import sys +# Provide basestring in python3 +try: + basestring = basestring +except NameError: + basestring = str + def pytest_addoption(parser): group = parser.getgroup("general") group.addoption('--runxfail', @@ -86,7 +92,7 @@ self.result = False for expr in self.holder.args: self.expr = expr - if isinstance(expr, str): + if isinstance(expr, basestring): result = cached_eval(self.item.config, expr, d) else: pytest.fail("expression is not a string") diff -r 18234e3726bf090183d0cf7cc76c58ac89c179fb -r e2b3cb8add4138967f980de01ccaf99673cf8be7 testing/test_skipping.py --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -39,6 +39,20 @@ expl = ev.getexplanation() assert expl == "condition: hasattr(os, 'sep')" + @pytest.mark.skipif('sys.version_info[0] >= 3') + def test_marked_one_arg_unicode(self, testdir): + item = testdir.getitem(""" + import pytest + @pytest.mark.xyz(u"hasattr(os, 'sep')") + def test_func(): + pass + """) + ev = MarkEvaluator(item, 'xyz') + assert ev + assert ev.istrue() + expl = ev.getexplanation() + assert expl == "condition: hasattr(os, 'sep')" + def test_marked_one_arg_with_reason(self, testdir): item = testdir.getitem(""" import pytest Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Feb 15 14:28:35 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Fri, 15 Feb 2013 13:28:35 -0000 Subject: [Pytest-commit] commit/pytest: flub: Mention fix of issue 266 in changelog Message-ID: <20130215132835.7274.69136@bitbucket20.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/57bc9ef8f935/ changeset: 57bc9ef8f935 user: flub date: 2013-02-15 14:28:26 summary: Mention fix of issue 266 in changelog affected #: 1 file diff -r e2b3cb8add4138967f980de01ccaf99673cf8be7 -r 57bc9ef8f9355784cc8a2a06da727c20bee52c95 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -34,6 +34,8 @@ - fix issue134 - print the collect errors that prevent running specified test items +- fix issue266 - accept unicode in MarkEvaluator expressions + Changes between 2.3.3 and 2.3.4 ----------------------------------- Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Fri Feb 15 14:38:52 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Fri, 15 Feb 2013 13:38:52 -0000 Subject: [Pytest-commit] commit/pytest: flub: Use py.builtin._basestring Message-ID: <20130215133852.23368.26265@bitbucket23.managed.contegix.com> 1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/a4ad4a06149f/ changeset: a4ad4a06149f user: flub date: 2013-02-15 14:38:40 summary: Use py.builtin._basestring affected #: 1 file diff -r 57bc9ef8f9355784cc8a2a06da727c20bee52c95 -r a4ad4a06149f957d921d1f9a4e33ed88ddf7cf07 _pytest/skipping.py --- a/_pytest/skipping.py +++ b/_pytest/skipping.py @@ -3,12 +3,6 @@ import py, pytest import sys -# Provide basestring in python3 -try: - basestring = basestring -except NameError: - basestring = str - def pytest_addoption(parser): group = parser.getgroup("general") group.addoption('--runxfail', @@ -92,7 +86,7 @@ self.result = False for expr in self.holder.args: self.expr = expr - if isinstance(expr, basestring): + if isinstance(expr, py.builtin._basestring): result = cached_eval(self.item.config, expr, d) else: pytest.fail("expression is not a string") Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Tue Feb 19 14:00:06 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 19 Feb 2013 13:00:06 -0000 Subject: [Pytest-commit] commit/tox: lukaszb: Added --list switch to show all envs Message-ID: <20130219130006.30465.67025@bitbucket20.managed.contegix.com> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/fa9fb217e45e/ changeset: fa9fb217e45e user: lukaszb date: 2013-02-18 22:00:41 summary: Added --list switch to show all envs affected #: 3 files diff -r a77eb52145e259314a341222866c3e6806024a15 -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -780,6 +780,26 @@ assert tox.__version__ in stdout assert "imported from" in stdout + def test_listenvs(self, cmd, initproj): + initproj('listenvs', filedefs={ + 'tox.ini': ''' + [tox] + envlist=py26,py27,py33,pypy,docs + + [testenv:docs] + changedir = docs + ''', + }) + result = cmd.run("tox", "-l") + stdout = result.stdout.str() + assert stdout.splitlines() == [ + ' * py26', + ' * py27', + ' * py33', + ' * pypy', + ' * docs', + ] + @py.test.mark.xfail("sys.version_info < (2,6)", reason="virtualenv3 cannot be imported") def test_config_specific_ini(self, tmpdir, cmd): diff -r a77eb52145e259314a341222866c3e6806024a15 -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -271,6 +271,8 @@ raise SystemExit(1) if self.config.option.showconfig: self.showconfig() + elif self.config.option.list_envs: + self.showenvs() else: return self.subcommand_test() @@ -415,6 +417,10 @@ self.report.line(" envdir= %s" % envconfig.envdir) self.report.line(" downloadcache=%s" % envconfig.downloadcache) + def showenvs(self): + for env in self.config.envlist: + self.report.line(" * %s" % env) + def info_versions(self): versions = ['tox-%s' % tox.__version__] version = py.process.cmdexec("virtualenv --version") diff -r a77eb52145e259314a341222866c3e6806024a15 -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -98,6 +98,8 @@ help="force recreation of virtual environments") parser.add_argument("args", nargs="*", help="additional arguments available to command positional substition") + parser.add_argument("-l", "--list", action="store_true", dest="list_envs", + help="show default envlist") return parser class Config: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Tue Feb 19 14:44:01 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 19 Feb 2013 13:44:01 -0000 Subject: [Pytest-commit] commit/tox: hpk42: add -l to changelog, lukasz to contributors and some refinements Message-ID: <20130219134401.13862.85267@bitbucket25.managed.contegix.com> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/40797cc09b79/ changeset: 40797cc09b79 user: hpk42 date: 2013-02-19 14:43:50 summary: add -l to changelog, lukasz to contributors and some refinements affected #: 6 files diff -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 -r 40797cc09b794bc4052486d2f878b994407ecc59 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ 1.4.3.dev ----------------- +- introduce -l|--listenv option to list configured environments + (thanks Lukasz Balcerzak) + - fix downloadcache determination to work according to docs: Only make pip use a download cache if PIP_DOWNLOAD_CACHE or a downloadcache=PATH testenv setting is present. (The ENV setting diff -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 -r 40797cc09b794bc4052486d2f878b994407ecc59 CONTRIBUTORS --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -5,3 +5,5 @@ Sridhar Ratnakumar Chris Rose Jannis Leidl +Ronny Pfannschmidt +Lukasz Balcerzak diff -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 -r 40797cc09b794bc4052486d2f878b994407ecc59 setup.py --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def main(): version = sys.version_info[:2] - install_requires = ['virtualenv==1.8.4', 'py>=1.4.9', ] + install_requires = ['virtualenv>=1.8.4', 'py>=1.4.9', ] if version < (2, 7) or (3, 0) <= version <= (3, 1): install_requires += ['argparse'] setup( @@ -77,4 +77,4 @@ ) if __name__ == '__main__': - main() \ No newline at end of file + main() diff -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 -r 40797cc09b794bc4052486d2f878b994407ecc59 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -786,19 +786,21 @@ [tox] envlist=py26,py27,py33,pypy,docs + [testenv:notincluded] + changedir = whatever + [testenv:docs] changedir = docs ''', }) result = cmd.run("tox", "-l") - stdout = result.stdout.str() - assert stdout.splitlines() == [ - ' * py26', - ' * py27', - ' * py33', - ' * pypy', - ' * docs', - ] + result.stdout.fnmatch_lines(""" + *py26* + *py27* + *py33* + *pypy* + *docs* + """) @py.test.mark.xfail("sys.version_info < (2,6)", reason="virtualenv3 cannot be imported") diff -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 -r 40797cc09b794bc4052486d2f878b994407ecc59 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -271,7 +271,7 @@ raise SystemExit(1) if self.config.option.showconfig: self.showconfig() - elif self.config.option.list_envs: + elif self.config.option.listenvs: self.showenvs() else: return self.subcommand_test() @@ -419,7 +419,7 @@ def showenvs(self): for env in self.config.envlist: - self.report.line(" * %s" % env) + self.report.line("%s" % env) def info_versions(self): versions = ['tox-%s' % tox.__version__] diff -r fa9fb217e45e25cd688ce39ad05d6ce36f0a6d27 -r 40797cc09b794bc4052486d2f878b994407ecc59 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -77,6 +77,8 @@ help="increase verbosity of reporting output.") parser.add_argument("--showconfig", action="store_true", dest="showconfig", help="show configuration information. ") + parser.add_argument("-l", "--listenvs", action="store_true", + dest="listenvs", help="show list of test environments") parser.add_argument("-c", action="store", default="tox.ini", dest="configfile", help="use the specified config file name.") @@ -98,8 +100,6 @@ help="force recreation of virtual environments") parser.add_argument("args", nargs="*", help="additional arguments available to command positional substition") - parser.add_argument("-l", "--list", action="store_true", dest="list_envs", - help="show default envlist") return parser class Config: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Tue Feb 19 15:07:05 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 19 Feb 2013 14:07:05 -0000 Subject: [Pytest-commit] commit/tox: hpk42: fix issue84 - pypy on windows creates a bin not a scripts venv directory Message-ID: <20130219140705.6711.63011@bitbucket22.managed.contegix.com> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/81a0cd4ac1bd/ changeset: 81a0cd4ac1bd user: hpk42 date: 2013-02-19 15:06:55 summary: fix issue84 - pypy on windows creates a bin not a scripts venv directory (thanks Lukasz Balcerzak) affected #: 3 files diff -r 40797cc09b794bc4052486d2f878b994407ecc59 -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,9 @@ downloadcache=PATH testenv setting is present. (The ENV setting takes precedence) +- fix issue84 - pypy on windows creates a bin not a scripts venv directory + (thanks Lukasz Balcerzak) + - experimentally introduce --installpkg=PATH option to install a package rather than create/install an sdist package. This will still require and use tox.ini and tests from the current working dir (and not from the remote diff -r 40797cc09b794bc4052486d2f878b994407ecc59 -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 tests/test_config.py --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,4 +1,5 @@ import tox +import pytest import os, sys from textwrap import dedent @@ -362,14 +363,18 @@ envconfig = config.envconfigs['python'] assert envconfig.envpython == envconfig.envbindir.join("python") - def test_envbindir_jython(self, tmpdir, newconfig): + @pytest.mark.parametrize("bp", ["jython", "pypy"]) + def test_envbindir_jython(self, tmpdir, newconfig, bp): config = newconfig(""" [testenv] - basepython=jython - """) + basepython=%s + """ % bp) assert len(config.envconfigs) == 1 envconfig = config.envconfigs['python'] - assert envconfig.envpython == envconfig.envbindir.join("jython") + # on win32 and linux virtualenv uses "bin" for pypy/jython + assert envconfig.envbindir.basename == "bin" + if bp == "jython": + assert envconfig.envpython == envconfig.envbindir.join(bp) def test_setenv_overrides(self, tmpdir, newconfig): config = newconfig(""" diff -r 40797cc09b794bc4052486d2f878b994407ecc59 -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -113,7 +113,8 @@ @property def envbindir(self): - if sys.platform == "win32" and "jython" not in self.basepython: + if (sys.platform == "win32" and "jython" not in self.basepython + and "pypy" not in self.basepython): return self.envdir.join("Scripts") else: return self.envdir.join("bin") Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Tue Feb 19 15:35:27 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 19 Feb 2013 14:35:27 -0000 Subject: [Pytest-commit] commit/tox: hpk42: fix issue85 - failing links/sphinx docs - thanks Marc Abramowitz Message-ID: <20130219143527.26412.84499@bitbucket15.managed.contegix.com> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/3fa2f7ff4030/ changeset: 3fa2f7ff4030 user: hpk42 date: 2013-02-19 15:34:59 summary: fix issue85 - failing links/sphinx docs - thanks Marc Abramowitz affected #: 6 files diff -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 -r 3fa2f7ff4030297a6798475040b85702ed594806 doc/announce/release-1.4.txt --- a/doc/announce/release-1.4.txt +++ b/doc/announce/release-1.4.txt @@ -4,7 +4,7 @@ I am happy to announce tox 1.4 which brings: - improvements with configuration file syntax, now allowing re-using - selected settings across config file sections. see http://bit.ly/Ly3K4f + selected settings across config file sections. see http://testrun.org/tox/latest/config.html#substition-for-values-from-other-sections - terminal reporting was simplified and streamlined. Now with verbosity==0 (the default), less information will be shown diff -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 -r 3fa2f7ff4030297a6798475040b85702ed594806 doc/index.txt --- a/doc/index.txt +++ b/doc/index.txt @@ -98,6 +98,7 @@ install examples config + config-v2 support changelog links diff -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 -r 3fa2f7ff4030297a6798475040b85702ed594806 doc/links.txt --- a/doc/links.txt +++ b/doc/links.txt @@ -1,20 +1,20 @@ .. _Python: http://www.python.org -.. _virtualenv: http://pypi.python.org/pypi/virtualenv -.. _virtualenv3: http://pypi.python.org/pypi/virtualenv3 -.. _virtualenv5: http://pypi.python.org/pypi/virtualenv5 +.. _virtualenv: https://pypi.python.org/pypi/virtualenv +.. _virtualenv3: https://pypi.python.org/pypi/virtualenv3 +.. _virtualenv5: https://pypi.python.org/pypi/virtualenv5 .. _`py.test`: http://pytest.org .. _nosetests: -.. _`nose`: http://pypi.python.org/pypi/nose -.. _`Holger Krekel`: http://twitter.com/hpk42 -.. _`pytest-xdist`: http://pypi.python.org/pypi/pytest-xdist +.. _`nose`: https://pypi.python.org/pypi/nose +.. _`Holger Krekel`: https://twitter.com/hpk42 +.. _`pytest-xdist`: https://pypi.python.org/pypi/pytest-xdist .. _`easy_install`: http://peak.telecommunity.com/DevCenter/EasyInstall -.. _pip: http://pypi.python.org/pypi/pip -.. _setuptools: http://pypi.python.org/pypi/setuptools -.. _distribute: http://pypi.python.org/pypi/distribute +.. _pip: https://pypi.python.org/pypi/pip +.. _setuptools: https://pypi.python.org/pypi/setuptools +.. _distribute: https://pypi.python.org/pypi/distribute .. _`jenkins`: http://jenkins-ci.org/ -.. _sphinx: http://pypi.python.org/pypi/Sphinx -.. _discover: http://pypi.python.org/pypi/discover -.. _unittest2: http://pypi.python.org/pypi/unittest2 -.. _mock: http://pypi.python.org/pypi/mock/ +.. _sphinx: https://pypi.python.org/pypi/Sphinx +.. _discover: https://pypi.python.org/pypi/discover +.. _unittest2: https://pypi.python.org/pypi/unittest2 +.. _mock: https://pypi.python.org/pypi/mock/ diff -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 -r 3fa2f7ff4030297a6798475040b85702ed594806 doc/support.txt --- a/doc/support.txt +++ b/doc/support.txt @@ -21,7 +21,7 @@ If you are looking for on-site teaching or consulting support, contact holger at `merlinux.eu`_, an association of -`experienced well-known Python developers`_. +experienced `well-known Python developers`_. .. _`well-known Python developers`: http://merlinux.eu/people.txt .. _`Maciej Fijalkowski`: http://www.ohloh.net/accounts/fijal diff -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 -r 3fa2f7ff4030297a6798475040b85702ed594806 setup.py --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ description='virtualenv-based automation of test activities', long_description=long_description, url='http://tox.testrun.org/', - version='1.4.3.dev6', + version='1.4.3.dev7', license='GPLv2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 81a0cd4ac1bdf797f4f0efbf8aea29606aa8a9b0 -r 3fa2f7ff4030297a6798475040b85702ed594806 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.4.3.dev6' +__version__ = '1.4.3.dev7' class exception: class Error(Exception): Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Tue Feb 19 16:01:17 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Tue, 19 Feb 2013 15:01:17 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20130219150117.31850.54698@bitbucket01.managed.contegix.com> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/4c6c4662ffa3/ changeset: 4c6c4662ffa3 user: hpk42 date: 2013-02-19 15:51:20 summary: 1.4.3 affected #: 4 files diff -r 3fa2f7ff4030297a6798475040b85702ed594806 -r 4c6c4662ffa38929e8f1667d8ec716e18ef7b513 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -1.4.3.dev +1.4.3 ----------------- - introduce -l|--listenv option to list configured environments diff -r 3fa2f7ff4030297a6798475040b85702ed594806 -r 4c6c4662ffa38929e8f1667d8ec716e18ef7b513 doc/announce/release-1.4.3.txt --- /dev/null +++ b/doc/announce/release-1.4.3.txt @@ -0,0 +1,94 @@ +tox 1.4.3: the Python virtualenv-based testing automatizer +============================================================================= + +tox 1.4.3 fixes some bugs and introduces a new script and two new options: + +- "tox-quickstart" - run this script, answer a few questions, and + get a tox.ini created for you (thanks Marc Abramowitz) + +- "tox -l" lists configured environment names (thanks Lukasz Balcerzak) + +- (experimental) "--installpkg=localpath" option which will skip the + sdist-creation of a package and instead install the given localpath package. + +Note that the sister project "detox" should continue to work - it's a +separately released project which drives tox test runs on multiple CPUs +in parallel. + +More documentation: + + http://tox.testrun.org/ + +Installation: + + pip install -U tox + +code hosting and issue tracking on bitbucket: + + https://bitbucket.org/hpk42/tox + + +What is tox? +---------------- + +tox standardizes and automates tedious test activities driven from a +simple ``tox.ini`` file, including: + +* creation and management of different virtualenv environments + with different Python interpreters +* packaging and installing your package into each of them +* running your test tool of choice, be it nose, py.test or unittest2 or other tools such as "sphinx" doc checks +* testing dev packages against each other without needing to upload to PyPI + +best, +Holger Krekel + + +CHANGELOG +================ + +1.4.3 (compared to 1.4.2) +-------------------------------- + +- introduce -l|--listenv option to list configured environments + (thanks Lukasz Balcerzak) + +- fix downloadcache determination to work according to docs: Only + make pip use a download cache if PIP_DOWNLOAD_CACHE or a + downloadcache=PATH testenv setting is present. (The ENV setting + takes precedence) + +- fix issue84 - pypy on windows creates a bin not a scripts venv directory + (thanks Lukasz Balcerzak) + +- experimentally introduce --installpkg=PATH option to install a package rather than + create/install an sdist package. This will still require and use + tox.ini and tests from the current working dir (and not from the remote + package). + +- substitute {envsitepackagesdir} with the package installation directory (closes #72) + (thanks g2p) + +- issue #70 remove PYTHONDONTWRITEBYTECODE workaround now that + virtualenv behaves properly (thanks g2p) + +- merged tox-quickstart command, contributed by Marc Abramowitz, which + generates a default tox.ini after asking a few questions + +- fix #48 - win32 detection of pypy and other interpreters that are on PATH + (thanks Gustavo Picon) + +- fix grouping of index servers, it is now done by name instead of + indexserver url, allowing to use it to separate dependencies + into groups even if using the same default indexserver. + +- look for "tox.ini" files in parent dirs of current dir (closes #34) + +- the "py" environment now by default uses the current interpreter + (sys.executable) make tox' own setup.py test execute tests with it + (closes #46) + +- change tests to not rely on os.path.expanduser (closes #60), + also make mock session return args[1:] for more precise checking (closes #61) + thanks to Barry Warszaw for both. + diff -r 3fa2f7ff4030297a6798475040b85702ed594806 -r 4c6c4662ffa38929e8f1667d8ec716e18ef7b513 setup.py --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ description='virtualenv-based automation of test activities', long_description=long_description, url='http://tox.testrun.org/', - version='1.4.3.dev7', + version='1.4.3', license='GPLv2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', diff -r 3fa2f7ff4030297a6798475040b85702ed594806 -r 4c6c4662ffa38929e8f1667d8ec716e18ef7b513 tox/__init__.py --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.4.3.dev7' +__version__ = '1.4.3' class exception: class Error(Exception): https://bitbucket.org/hpk42/tox/commits/69e75192ec3a/ changeset: 69e75192ec3a user: hpk42 date: 2013-02-19 16:00:49 summary: adding a little release announce affected #: 1 file diff -r 4c6c4662ffa38929e8f1667d8ec716e18ef7b513 -r 69e75192ec3afde1ff39b572726f6438e9572a89 doc/index.txt --- a/doc/index.txt +++ b/doc/index.txt @@ -108,6 +108,7 @@ announce/release-1.2 announce/release-1.3 announce/release-1.4 + announce/release-1.4.3 .. include:: links.txt Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Wed Feb 20 09:03:23 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Wed, 20 Feb 2013 08:03:23 -0000 Subject: [Pytest-commit] commit/tox: 4 new changesets Message-ID: <20130220080323.29362.21390@bitbucket01.managed.contegix.com> 4 new commits in tox: https://bitbucket.org/hpk42/tox/commits/a853f627bc5f/ changeset: a853f627bc5f branch: develop-pip-win32 user: philip_thiem date: 2013-02-20 01:39:35 summary: branch created affected #: 0 files https://bitbucket.org/hpk42/tox/commits/586fd3d32514/ changeset: 586fd3d32514 branch: develop-pip-win32 user: philip_thiem date: 2013-02-20 02:15:36 summary: On win32 call pip-script.py instead of pip. Then _cmdline would need to be patched to add the interpreter for the py script. affected #: 2 files diff -r a853f627bc5f0077256975c6ceddccbd6753888e -r 586fd3d325142efe071f727ed2a10a83e0fe2ff6 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -120,6 +120,14 @@ if sys.platform != "win32" and isinstance(arg, py.path.local): arg = cwd.bestrelpath(arg) newargs.append(str(arg)) + + #subprocess does not always take kindly to .py scripts + #so adding the interpreter here. + if sys.platform == "win32": + ext = os.path.splitext(str(newargs[0]))[1].lower() + if ext == '.py' and self.venv: + newargs = [str(self.venv.getcommandpath())] + newargs + return newargs def _popen(self, args, cwd, stdout, stderr, env=None): diff -r a853f627bc5f0077256975c6ceddccbd6753888e -r 586fd3d325142efe071f727ed2a10a83e0fe2ff6 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -211,6 +211,8 @@ def pip_install(self, args, indexserver=None, action=None): argv = ["pip", "install"] + self._commoninstallopts(indexserver) + if sys.platform == "win32": + argv[0] = "pip-script.py" if self.envconfig.downloadcache: self.envconfig.downloadcache.ensure(dir=1) argv.append("--download-cache=%s" % https://bitbucket.org/hpk42/tox/commits/e08ad7b3bca6/ changeset: e08ad7b3bca6 branch: develop-pip-win32 user: philip_thiem date: 2013-02-20 02:17:54 summary: It would seem that python 3.1 lacked the keyword "callable" affected #: 1 file diff -r 586fd3d325142efe071f727ed2a10a83e0fe2ff6 -r e08ad7b3bca68d8855e213a1c15e958d61c71293 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -12,6 +12,15 @@ import tox +#needed if supporting 3.1 as they had removed callable +import collections +try: + callable = callable +except NameError: + def callable(x): + return isinstance(x, collections.Callable) + + defaultenvs = {'jython': 'jython', 'pypy': 'pypy'} for _name in "py,py24,py25,py26,py27,py30,py31,py32,py33,py34".split(","): if _name == "py": https://bitbucket.org/hpk42/tox/commits/6abfe6e2646c/ changeset: 6abfe6e2646c branch: develop-pip-win32 user: philip_thiem date: 2013-02-20 03:11:03 summary: Need to use the shell on win32 in order to get sphinx-build mapped to sphinx-build.exe (thankfully there isn't a shpinux-build extension-less sh/py script) affected #: 1 file diff -r e08ad7b3bca68d8855e213a1c15e958d61c71293 -r 6abfe6e2646c7af908adbcfbac30b8491d732a5a doc/check_sphinx.py --- a/doc/check_sphinx.py +++ b/doc/check_sphinx.py @@ -5,13 +5,13 @@ htmldir = tmpdir.join("html") subprocess.check_call([ "sphinx-build", "-W", "-bhtml", - "-d", str(doctrees), ".", str(htmldir)]) + "-d", str(doctrees), ".", str(htmldir)], shell=True) def test_linkcheck(tmpdir): doctrees = tmpdir.join("doctrees") htmldir = tmpdir.join("html") subprocess.check_call( ["sphinx-build", "-blinkcheck", - "-d", str(doctrees), ".", str(htmldir)]) + "-d", str(doctrees), ".", str(htmldir)], shell=True) Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Wed Feb 20 09:11:48 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Wed, 20 Feb 2013 08:11:48 -0000 Subject: [Pytest-commit] commit/tox: 3 new changesets Message-ID: <20130220081148.31427.48758@bitbucket13.managed.contegix.com> 3 new commits in tox: https://bitbucket.org/hpk42/tox/commits/b6ec4cd8f448/ changeset: b6ec4cd8f448 branch: develop-pip-win32 user: RonnyPfannschmidt date: 2013-02-20 09:08:15 summary: add Philip to the contributors list affected #: 1 file diff -r 6abfe6e2646c7af908adbcfbac30b8491d732a5a -r b6ec4cd8f4482371bfddfcaff9b8276dc0f57fd4 CONTRIBUTORS --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -7,3 +7,4 @@ Jannis Leidl Ronny Pfannschmidt Lukasz Balcerzak +Philip Thiem https://bitbucket.org/hpk42/tox/commits/481258d96e16/ changeset: 481258d96e16 branch: develop-pip-win32 user: RonnyPfannschmidt date: 2013-02-20 09:09:50 summary: changelog affected #: 1 file diff -r b6ec4cd8f4482371bfddfcaff9b8276dc0f57fd4 -r 481258d96e16c7eb8de24898210da37470c89d0f CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ 1.4.3 ----------------- +- use pip-script.py instead of pip.exe on win32 to avoid the lock exe file on execution issue + (thanks Philip Thiem) + - introduce -l|--listenv option to list configured environments (thanks Lukasz Balcerzak) https://bitbucket.org/hpk42/tox/commits/1f4d321c5a55/ changeset: 1f4d321c5a55 branch: develop-pip-win32 user: RonnyPfannschmidt date: 2013-02-20 09:10:50 summary: extra comment affected #: 1 file diff -r 481258d96e16c7eb8de24898210da37470c89d0f -r 1f4d321c5a55f650bde35ca2fac5203da22e4a11 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -211,6 +211,7 @@ def pip_install(self, args, indexserver=None, action=None): argv = ["pip", "install"] + self._commoninstallopts(indexserver) + # use pip-script on win32 to avoid the executable locking if sys.platform == "win32": argv[0] = "pip-script.py" if self.envconfig.downloadcache: Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Wed Feb 20 09:13:14 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Wed, 20 Feb 2013 08:13:14 -0000 Subject: [Pytest-commit] commit/tox: RonnyPfannschmidt: add to announcement Message-ID: <20130220081314.27329.24520@bitbucket15.managed.contegix.com> 1 new commit in tox: https://bitbucket.org/hpk42/tox/commits/4012a13eac2b/ changeset: 4012a13eac2b branch: develop-pip-win32 user: RonnyPfannschmidt date: 2013-02-20 09:12:52 summary: add to announcement affected #: 1 file diff -r 1f4d321c5a55f650bde35ca2fac5203da22e4a11 -r 4012a13eac2b473a55ace8084e257b66e21b230a doc/announce/release-1.4.3.txt --- a/doc/announce/release-1.4.3.txt +++ b/doc/announce/release-1.4.3.txt @@ -11,6 +11,8 @@ - (experimental) "--installpkg=localpath" option which will skip the sdist-creation of a package and instead install the given localpath package. +- use pip-script.py instead of pip.exe on win32 to avoid windows locking the .exe + Note that the sister project "detox" should continue to work - it's a separately released project which drives tox test runs on multiple CPUs in parallel. Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Wed Feb 20 09:18:33 2013 From: commits-noreply at bitbucket.org (Bitbucket) Date: Wed, 20 Feb 2013 08:18:33 -0000 Subject: [Pytest-commit] commit/tox: 3 new changesets Message-ID: <20130220081833.32752.12782@bitbucket16.managed.contegix.com> 3 new commits in tox: https://bitbucket.org/hpk42/tox/commits/ea96b4c04ab4/ changeset: ea96b4c04ab4 branch: develop-pip-win32 user: RonnyPfannschmidt date: 2013-02-20 09:16:41 summary: use py.builtin.callable instead of own backward compat affected #: 1 file diff -r 4012a13eac2b473a55ace8084e257b66e21b230a -r ea96b4c04ab46b9143815b8262b90d6ff3ed5006 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -12,14 +12,6 @@ import tox -#needed if supporting 3.1 as they had removed callable -import collections -try: - callable = callable -except NameError: - def callable(x): - return isinstance(x, collections.Callable) - defaultenvs = {'jython': 'jython', 'pypy': 'pypy'} for _name in "py,py24,py25,py26,py27,py30,py31,py32,py33,py34".split(","): @@ -498,7 +490,7 @@ raise tox.exception.ConfigError( "substitution key %r not found" % key) - if callable(val): + if py.builtin.callable(val): val = val() return str(val) https://bitbucket.org/hpk42/tox/commits/e992e9b1a100/ changeset: e992e9b1a100 branch: develop-pip-win32 user: RonnyPfannschmidt date: 2013-02-20 09:16:56 summary: close before merge affected #: 0 files https://bitbucket.org/hpk42/tox/commits/005c8cb84ddd/ changeset: 005c8cb84ddd user: RonnyPfannschmidt date: 2013-02-20 09:17:14 summary: merge develop-pip-win32 affected #: 7 files diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ 1.4.3 ----------------- +- use pip-script.py instead of pip.exe on win32 to avoid the lock exe file on execution issue + (thanks Philip Thiem) + - introduce -l|--listenv option to list configured environments (thanks Lukasz Balcerzak) diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 CONTRIBUTORS --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -7,3 +7,4 @@ Jannis Leidl Ronny Pfannschmidt Lukasz Balcerzak +Philip Thiem diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 doc/announce/release-1.4.3.txt --- a/doc/announce/release-1.4.3.txt +++ b/doc/announce/release-1.4.3.txt @@ -11,6 +11,8 @@ - (experimental) "--installpkg=localpath" option which will skip the sdist-creation of a package and instead install the given localpath package. +- use pip-script.py instead of pip.exe on win32 to avoid windows locking the .exe + Note that the sister project "detox" should continue to work - it's a separately released project which drives tox test runs on multiple CPUs in parallel. diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 doc/check_sphinx.py --- a/doc/check_sphinx.py +++ b/doc/check_sphinx.py @@ -5,13 +5,13 @@ htmldir = tmpdir.join("html") subprocess.check_call([ "sphinx-build", "-W", "-bhtml", - "-d", str(doctrees), ".", str(htmldir)]) + "-d", str(doctrees), ".", str(htmldir)], shell=True) def test_linkcheck(tmpdir): doctrees = tmpdir.join("doctrees") htmldir = tmpdir.join("html") subprocess.check_call( ["sphinx-build", "-blinkcheck", - "-d", str(doctrees), ".", str(htmldir)]) + "-d", str(doctrees), ".", str(htmldir)], shell=True) diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 tox/_cmdline.py --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -120,6 +120,14 @@ if sys.platform != "win32" and isinstance(arg, py.path.local): arg = cwd.bestrelpath(arg) newargs.append(str(arg)) + + #subprocess does not always take kindly to .py scripts + #so adding the interpreter here. + if sys.platform == "win32": + ext = os.path.splitext(str(newargs[0]))[1].lower() + if ext == '.py' and self.venv: + newargs = [str(self.venv.getcommandpath())] + newargs + return newargs def _popen(self, args, cwd, stdout, stderr, env=None): diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 tox/_config.py --- a/tox/_config.py +++ b/tox/_config.py @@ -12,6 +12,7 @@ import tox + defaultenvs = {'jython': 'jython', 'pypy': 'pypy'} for _name in "py,py24,py25,py26,py27,py30,py31,py32,py33,py34".split(","): if _name == "py": @@ -489,7 +490,7 @@ raise tox.exception.ConfigError( "substitution key %r not found" % key) - if callable(val): + if py.builtin.callable(val): val = val() return str(val) diff -r 69e75192ec3afde1ff39b572726f6438e9572a89 -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 tox/_venv.py --- a/tox/_venv.py +++ b/tox/_venv.py @@ -211,6 +211,9 @@ def pip_install(self, args, indexserver=None, action=None): argv = ["pip", "install"] + self._commoninstallopts(indexserver) + # use pip-script on win32 to avoid the executable locking + if sys.platform == "win32": + argv[0] = "pip-script.py" if self.envconfig.downloadcache: self.envconfig.downloadcache.ensure(dir=1) argv.append("--download-cache=%s" % Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. From commits-noreply at bitbucket.org Thu Feb 28 15:44:32 2013 From: commits-noreply at bitbucket.org (commits-noreply at bitbucket.org) Date: Thu, 28 Feb 2013 14:44:32 -0000 Subject: [Pytest-commit] commit/tox: 2 new changesets Message-ID: <20130228144432.32692.26341@bitbucket03.managed.contegix.com> 2 new commits in tox: https://bitbucket.org/hpk42/tox/commits/d022c2a1d45f/ changeset: d022c2a1d45f user: hpk42 date: 2013-02-20 09:48:13 summary: for me shell=True fails the sphinx checking, turning it off again affected #: 2 files diff -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 -r d022c2a1d45fc7114df72f166d5949855505a2b6 doc/check_sphinx.py --- a/doc/check_sphinx.py +++ b/doc/check_sphinx.py @@ -5,13 +5,13 @@ htmldir = tmpdir.join("html") subprocess.check_call([ "sphinx-build", "-W", "-bhtml", - "-d", str(doctrees), ".", str(htmldir)], shell=True) + "-d", str(doctrees), ".", str(htmldir)]) def test_linkcheck(tmpdir): doctrees = tmpdir.join("doctrees") htmldir = tmpdir.join("html") subprocess.check_call( ["sphinx-build", "-blinkcheck", - "-d", str(doctrees), ".", str(htmldir)], shell=True) + "-d", str(doctrees), ".", str(htmldir)]) diff -r 005c8cb84ddd23b2e9ebced73b65c653aeed0560 -r d022c2a1d45fc7114df72f166d5949855505a2b6 tox.ini --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist=py27,py26,py25,py31,py32,py33,docs indexserver = testrun = http://pypi.testrun.org - pypi = http://pypi.python.org/simple + pypi = https://pypi.python.org/simple [testenv:X] commands=echo {posargs} https://bitbucket.org/hpk42/tox/commits/f5177c612fba/ changeset: f5177c612fba user: hpk42 date: 2013-02-28 15:44:19 summary: a few fixes and release preps affected #: 5 files diff -r d022c2a1d45fc7114df72f166d5949855505a2b6 -r f5177c612fbadb8552c58693fa7249388c1c1bd3 CHANGELOG --- a/CHANGELOG +++ b/CHANGELOG @@ -1,8 +1,8 @@ 1.4.3 ----------------- -- use pip-script.py instead of pip.exe on win32 to avoid the lock exe file on execution issue - (thanks Philip Thiem) +- use pip-script.py instead of pip.exe on win32 to avoid the lock exe + file on execution issue (thanks Philip Thiem) - introduce -l|--listenv option to list configured environments (thanks Lukasz Balcerzak) @@ -15,13 +15,13 @@ - fix issue84 - pypy on windows creates a bin not a scripts venv directory (thanks Lukasz Balcerzak) -- experimentally introduce --installpkg=PATH option to install a package rather than - create/install an sdist package. This will still require and use - tox.ini and tests from the current working dir (and not from the remote - package). +- experimentally introduce --installpkg=PATH option to install a package + rather than create/install an sdist package. This will still require + and use tox.ini and tests from the current working dir (and not from the + remote package). -- substitute {envsitepackagesdir} with the package installation directory (closes #72) - (thanks g2p) +- substitute {envsitepackagesdir} with the package installation + directory (closes #72) (thanks g2p) - issue #70 remove PYTHONDONTWRITEBYTECODE workaround now that virtualenv behaves properly (thanks g2p) diff -r d022c2a1d45fc7114df72f166d5949855505a2b6 -r f5177c612fbadb8552c58693fa7249388c1c1bd3 doc/announce/release-1.4.3.txt --- a/doc/announce/release-1.4.3.txt +++ b/doc/announce/release-1.4.3.txt @@ -11,7 +11,8 @@ - (experimental) "--installpkg=localpath" option which will skip the sdist-creation of a package and instead install the given localpath package. -- use pip-script.py instead of pip.exe on win32 to avoid windows locking the .exe +- use pip-script.py instead of pip.exe on win32 to avoid windows locking + the .exe Note that the sister project "detox" should continue to work - it's a separately released project which drives tox test runs on multiple CPUs @@ -25,7 +26,7 @@ pip install -U tox -code hosting and issue tracking on bitbucket: +repository hosting and issue tracking on bitbucket: https://bitbucket.org/hpk42/tox @@ -33,8 +34,8 @@ What is tox? ---------------- -tox standardizes and automates tedious test activities driven from a -simple ``tox.ini`` file, including: +tox standardizes and automates tedious python driven test activities +driven from a simple ``tox.ini`` file, including: * creation and management of different virtualenv environments with different Python interpreters diff -r d022c2a1d45fc7114df72f166d5949855505a2b6 -r f5177c612fbadb8552c58693fa7249388c1c1bd3 doc/support.txt --- a/doc/support.txt +++ b/doc/support.txt @@ -30,7 +30,7 @@ .. _`holger's twitter presence`: http://twitter.com/hpk42 .. _`merlinux.eu`: http://merlinux.eu .. _`report on the issue tracker`: https://bitbucket.org/hpk42/tox/issues?status=new&status=open -.. _`tetamap blog`: http://tetamap.wordpress.com +.. _`tetamap blog`: http://holgerkrekel.net .. _`tox-dev`: http://codespeak.net/mailman/listinfo/tox-dev .. _`tox-commit`: http://codespeak.net/mailman/listinfo/tox-commit .. _`clone the mercurial repository`: https://bitbucket.org/hpk42/tox diff -r d022c2a1d45fc7114df72f166d5949855505a2b6 -r f5177c612fbadb8552c58693fa7249388c1c1bd3 setup.py --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def main(): version = sys.version_info[:2] - install_requires = ['virtualenv>=1.8.4', 'py>=1.4.9', ] + install_requires = ['virtualenv>=1.8.4', 'py>=1.4.12', ] if version < (2, 7) or (3, 0) <= version <= (3, 1): install_requires += ['argparse'] setup( diff -r d022c2a1d45fc7114df72f166d5949855505a2b6 -r f5177c612fbadb8552c58693fa7249388c1c1bd3 tox.ini --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27,py26,py25,py31,py32,py33,docs +envlist=py27,py26,py25,py32,py33,docs,pypy indexserver = testrun = http://pypi.testrun.org pypi = https://pypi.python.org/simple Repository URL: https://bitbucket.org/hpk42/tox/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.