3 new commits in tox:

https://bitbucket.org/hpk42/tox/commits/1decacf80bc9/
Changeset:   1decacf80bc9
User:        hpk42
Date:        2013-11-27 17:16:28
Summary:     clarify we want test dependencies, not app dependencies.
Affected #:  1 file

diff -r 7d8976da0b000e0d36ef61545c0f779bb9fe4c09 -r 
1decacf80bc97c2f177a10439b5c1c95964fcef5 tox/_quickstart.py
--- a/tox/_quickstart.py
+++ b/tox/_quickstart.py
@@ -56,7 +56,7 @@
     term_input = input
 
 
-all_envs = ['py24', 'py25', 'py26', 'py27', 'py30', 'py31', 'py32', 'py33', 
'pypy', 'jython']
+all_envs = ['py25', 'py26', 'py27', 'py30', 'py31', 'py32', 'py33', 'pypy', 
'jython']
 
 PROMPT_PREFIX = '> '
 
@@ -191,7 +191,7 @@
         default_deps = 'twisted'
 
     print('''
-What dependencies does your project have?''')
+What extra dependencies do your tests have?''')
     do_prompt(d, 'deps', 'Comma-separated list of dependencies', default_deps)
 
 


https://bitbucket.org/hpk42/tox/commits/7744bc22f8e4/
Changeset:   7744bc22f8e4
User:        hpk42
Date:        2013-12-09 14:02:49
Summary:     merge
Affected #:  1 file

diff -r 1decacf80bc97c2f177a10439b5c1c95964fcef5 -r 
7744bc22f8e499fa984d572bcfcf26462a83e037 tox/_cmdline.py
--- a/tox/_cmdline.py
+++ b/tox/_cmdline.py
@@ -557,7 +557,7 @@
             return candidates[0]
 
 
-_rex_getversion = py.std.re.compile("[\w_\-\+]+-(.*)(\.zip|\.tar.gz)")
+_rex_getversion = py.std.re.compile("[\w_\-\+\.]+-(.*)(\.zip|\.tar.gz)")
 def getversion(basename):
     m = _rex_getversion.match(basename)
     if m is None:


https://bitbucket.org/hpk42/tox/commits/df22328d1c85/
Changeset:   df22328d1c85
User:        hpk42
Date:        2013-12-09 14:33:46
Summary:     drop Python2.5 compatibility because it became too hard due
to the setuptools-2.0 dropping support.  tox now has no
support for creating python2.5 virtualenv environments anymore.
Affected #:  10 files

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
 1.6.2.dev
 ---------
 
+- drop Python2.5 compatibility because it became too hard due
+  to the setuptools-2.0 dropping support.  tox now has no 
+  support for creating python2.5 virtualenv environments anymore.
+
 - merged PR81: new option --force-dep which allows to 
   override tox.ini specified dependencies in setuptools-style.
   For example "--force-dep 'django<1.6'" will make sure

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tests/test_config.py
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -546,36 +546,6 @@
         assert envconfig.changedir.basename == "abc"
         assert envconfig.changedir == config.setupdir.join("abc")
 
-    def test_install_command_defaults_py25(self, newconfig, monkeypatch):
-        from tox.interpreters import Interpreters
-        def get_info(self, name):
-            if "x25" in name:
-                class I:
-                    runnable = True
-                    executable = "python2.5"
-                    version_info = (2,5)
-            else:
-                class I:
-                    runnable = False
-                    executable = "python"
-            return I
-        monkeypatch.setattr(Interpreters, "get_info", get_info)
-        config = newconfig("""
-            [testenv:x25]
-            basepython = x25
-            [testenv:py25-x]
-            basepython = x25
-            [testenv:py26]
-            basepython = "python"
-        """)
-        for name in ("x25", "py25-x"):
-            env = config.envconfigs[name]
-            assert env.install_command == \
-               "pip install {opts} {packages}".split()
-        env = config.envconfigs["py26"]
-        assert env.install_command == \
-               "pip install --pre {opts} {packages}".split()
-
     def test_install_command_setting(self, newconfig):
         config = newconfig("""
             [testenv]
@@ -629,14 +599,14 @@
 
     def test_simple(tmpdir, newconfig):
         config = newconfig("""
-            [testenv:py24]
-            basepython=python2.4
-            [testenv:py25]
-            basepython=python2.5
+            [testenv:py26]
+            basepython=python2.6
+            [testenv:py27]
+            basepython=python2.7
         """)
         assert len(config.envconfigs) == 2
-        assert "py24" in config.envconfigs
-        assert "py25" in config.envconfigs
+        assert "py26" in config.envconfigs
+        assert "py27" in config.envconfigs
 
     def test_substitution_error(tmpdir, newconfig):
         py.test.raises(tox.exception.ConfigError, newconfig, """

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tests/test_quickstart.py
--- a/tests/test_quickstart.py
+++ b/tests/test_quickstart.py
@@ -23,10 +23,12 @@
 
         return mock_term_input
 
-    def test_quickstart_main_choose_individual_pythons_and_pytest(self, 
monkeypatch):
+    def test_quickstart_main_choose_individual_pythons_and_pytest(self,
+        monkeypatch):
         monkeypatch.setattr(
             tox._quickstart, 'term_input',
-            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 
'Y', 'Y', 'N', 'py.test', 'pytest']))
+            self.get_mock_term_input(
+                ['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'py.test', 'pytest']))
 
         tox._quickstart.main(argv=['tox-quickstart'])
 
@@ -37,7 +39,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py32, py33, pypy
+envlist = py26, py27, py32, py33, pypy
 
 [testenv]
 commands = py.test
@@ -50,7 +52,8 @@
     def 
test_quickstart_main_choose_individual_pythons_and_nose_adds_deps(self, 
monkeypatch):
         monkeypatch.setattr(
             tox._quickstart, 'term_input',
-            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 
'Y', 'Y', 'N', 'nosetests', '']))
+            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N',
+                                     'nosetests', '']))
 
         tox._quickstart.main(argv=['tox-quickstart'])
 
@@ -61,7 +64,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py32, py33, pypy
+envlist = py26, py27, py32, py33, pypy
 
 [testenv]
 commands = nosetests
@@ -74,7 +77,8 @@
     def 
test_quickstart_main_choose_individual_pythons_and_trial_adds_deps(self, 
monkeypatch):
         monkeypatch.setattr(
             tox._quickstart, 'term_input',
-            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 
'Y', 'Y', 'N', 'trial', '']))
+            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N',
+                                      'trial', '']))
 
         tox._quickstart.main(argv=['tox-quickstart'])
 
@@ -85,7 +89,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py32, py33, pypy
+envlist = py26, py27, py32, py33, pypy
 
 [testenv]
 commands = trial
@@ -98,8 +102,8 @@
     def 
test_quickstart_main_choose_individual_pythons_and_pytest_adds_deps(self, 
monkeypatch):
         monkeypatch.setattr(
             tox._quickstart, 'term_input',
-            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'Y', 
'Y', 'Y', 'N', 'py.test', '']))
-
+            self.get_mock_term_input(['4', 'Y', 'Y', 'Y', 'Y', 'Y', 'N',
+                                      'py.test', '']))
         tox._quickstart.main(argv=['tox-quickstart'])
 
         expected_tox_ini = """
@@ -109,7 +113,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py32, py33, pypy
+envlist = py26, py27, py32, py33, pypy
 
 [testenv]
 commands = py.test
@@ -181,7 +185,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py30, py31, py32, py33, pypy, jython
+envlist = py26, py27, py32, py33, pypy, jython
 
 [testenv]
 commands = py.test
@@ -194,7 +198,7 @@
     def test_quickstart_main_choose_individual_pythons_and_defaults(self, 
monkeypatch):
         monkeypatch.setattr(
             tox._quickstart, 'term_input',
-            self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', 
'', '', '']))
+            self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', 
'']))
 
         tox._quickstart.main(argv=['tox-quickstart'])
 
@@ -205,7 +209,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py30, py31, py32, py33, pypy, jython
+envlist = py26, py27, py32, py33, pypy, jython
 
 [testenv]
 commands = {envpython} setup.py test
@@ -224,7 +228,7 @@
 
         monkeypatch.setattr(
             tox._quickstart, 'term_input',
-            self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', 
'', '', '', '']))
+            self.get_mock_term_input(['4', '', '', '', '', '', '', '', '', '', 
'', '']))
 
         tox._quickstart.main(argv=['tox-quickstart'])
 
@@ -235,7 +239,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py30, py31, py32, py33, pypy, jython
+envlist = py26, py27, py32, py33, pypy, jython
 
 [testenv]
 commands = {envpython} setup.py test
@@ -249,8 +253,6 @@
 class TestToxQuickstart(object):
     def test_pytest(self):
         d = {
-            'py24': True,
-            'py25': True,
             'py26': True,
             'py27': True,
             'py32': True,
@@ -266,7 +268,7 @@
 # and then run "tox" from this directory.
 
 [tox]
-envlist = py24, py25, py26, py27, py32, py33, pypy
+envlist = py26, py27, py32, py33, pypy
 
 [testenv]
 commands = py.test

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist=py25,py27,py26,py32,py33,pypy
+envlist=py27,py33,py26,py32,pypy
 
 [testenv:X]
 commands=echo {posargs}

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tox/_config.py
--- a/tox/_config.py
+++ b/tox/_config.py
@@ -183,6 +183,9 @@
         info = self.config.interpreters.get_info(self.basepython)
         if not info.executable:
             raise tox.exception.InterpreterNotFound(self.basepython)
+        if info.version_info < (2,6):
+            raise tox.exception.UnsupportedInterpreter(
+                "python2.5 is not supported anymore, sorry")
         return info.executable
 
 testenvprefix = "testenv:"
@@ -360,13 +363,7 @@
             downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", downloadcache)
             vc.downloadcache = py.path.local(downloadcache)
 
-        # on pip-1.3.1/python 2.5 we can't use "--pre".
-        pip_default_opts = ["{opts}", "{packages}"]
-        info = vc._basepython_info
-        if info.runnable and info.version_info < (2,6):
-            pass
-        else:
-            pip_default_opts.insert(0, "--pre")
+        pip_default_opts = ["--pre", "{opts}", "{packages}"]
         vc.install_command = reader.getargv(
             section,
             "install_command",

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tox/_pytestplugin.py
--- a/tox/_pytestplugin.py
+++ b/tox/_pytestplugin.py
@@ -19,7 +19,8 @@
 def pytest_report_header():
     return "tox comes from: %r" % (tox.__file__)
 
-def pytest_funcarg__newconfig(request, tmpdir):
+@pytest.fixture
+def newconfig(request, tmpdir):
     def newconfig(args, source=None):
         if source is None:
             source = args
@@ -34,7 +35,8 @@
             old.chdir()
     return newconfig
 
-def pytest_funcarg__cmd(request):
+@pytest.fixture
+def cmd(request):
     return Cmd(request)
 
 class ReportExpectMock:
@@ -113,7 +115,8 @@
     def wait(self):
         pass
 
-def pytest_funcarg__mocksession(request):
+@pytest.fixture
+def mocksession(request):
     from tox._cmdline import Session
     class MockSession(Session):
         def __init__(self):
@@ -137,7 +140,8 @@
             return pm
     return MockSession()
 
-def pytest_funcarg__newmocksession(request):
+@pytest.fixture
+def newmocksession(request):
     mocksession = request.getfuncargvalue("mocksession")
     newconfig = request.getfuncargvalue("newconfig")
     def newmocksession(args, source):

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tox/_quickstart.py
--- a/tox/_quickstart.py
+++ b/tox/_quickstart.py
@@ -56,7 +56,7 @@
     term_input = input
 
 
-all_envs = ['py25', 'py26', 'py27', 'py30', 'py31', 'py32', 'py33', 'pypy', 
'jython']
+all_envs = ['py26', 'py27', 'py32', 'py33', 'pypy', 'jython']
 
 PROMPT_PREFIX = '> '
 

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tox/_venv.py
--- a/tox/_venv.py
+++ b/tox/_venv.py
@@ -181,14 +181,9 @@
         interpreters = self.envconfig.config.interpreters
         config_interpreter = self.getsupportedinterpreter()
         info = interpreters.get_info(executable=config_interpreter)
-        use_venv191 = use_pip13 = info.version_info < (2,6)
-        if not use_venv191:
-            f, path, _ = py.std.imp.find_module("virtualenv")
-            f.close()
-            venvscript = path.rstrip("co")
-        else:
-            venvscript = py.path.local(tox.__file__).dirpath(
-                            "vendor", "virtualenv.py")
+        f, path, _ = py.std.imp.find_module("virtualenv")
+        f.close()
+        venvscript = path.rstrip("co")
         args = [config_interpreter, str(venvscript)]
         if self.envconfig.distribute:
             args.append("--distribute")
@@ -210,14 +205,7 @@
         args.append(self.path.basename)
         self._pcall(args, venv=False, action=action, cwd=basepath)
         self.just_created = True
-        if use_pip13:
-            indexserver = self.envconfig.config.indexserver['default'].url
-            action = self.session.newaction(self, "pip_downgrade")
-            action.setactivity('pip-downgrade', 'pip<1.4')
-            argv = ["easy_install"] + \
-                   self._installopts(indexserver) + ['pip<1.4']
-            self._pcall(argv, cwd=self.envconfig.config.toxinidir,
-                        action=action)
+
 
     def finish(self):
         self._getliveconfig().writeconfig(self.path_config)

diff -r 7744bc22f8e499fa984d572bcfcf26462a83e037 -r 
df22328d1c854b0529f461d7813b443ee108aa35 tox/interpreters.py
--- a/tox/interpreters.py
+++ b/tox/interpreters.py
@@ -12,7 +12,7 @@
 
     def get_executable(self, name):
         """ return path object to the executable for the given
-        name (e.g. python2.5, python2.7, python etc.)
+        name (e.g. python2.6, python2.7, python etc.)
         if name is already an existing path, return name.
         If an interpreter cannot be found, return None.
         """

This diff is so big that we needed to truncate the remainder.

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.
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
https://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to