From d3229af3da8a497ac934e07f77ed154d36fa2d24 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 10:43:24 +0200 Subject: [PATCH 1/7] Ignore IDE metadata --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index dc6ed03..aaa684d 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ pytestdebug.log .tox/ .cache/ .eggs/ +.idea/ From ed2db3d03a71900b02a7ab672087d566f04128ac Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 10:55:57 +0200 Subject: [PATCH 2/7] Drop support for EOL Python 2.6 --- .travis.yml | 1 - README.rst | 2 +- appveyor.yml | 1 - setup.py | 11 ++++++----- tox.ini | 2 +- xdist/scheduler/loadscope.py | 11 +++-------- 6 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index af09393..be060c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ notifications: - pytest-commit@python.org python: -- '2.6' - '2.7' - '3.4' - '3.5' diff --git a/README.rst b/README.rst index 46a61b6..8833888 100644 --- a/README.rst +++ b/README.rst @@ -229,7 +229,7 @@ You can also add default environments like this: .. code-block:: ini [pytest] - addopts = --tx ssh=myhost//python=python2.5 --tx ssh=myhost//python=python2.6 + addopts = --tx ssh=myhost//python=python2.5 --tx ssh=myhost//python=python3.6 and then just type:: diff --git a/appveyor.yml b/appveyor.yml index dfb8416..0173af9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,6 @@ environment: matrix: # note: please use "tox --listenvs" to populate the build matrix - - TOXENV: "py26-pytest30" - TOXENV: "py27-pytest30" - TOXENV: "py34-pytest30" - TOXENV: "py35-pytest30" diff --git a/setup.py b/setup.py index 7f8b057..9c2caab 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,7 @@ -from sys import version_info - from setuptools import setup, find_packages install_requires = ['execnet>=1.1', 'pytest>=3.0.0', 'pytest-forked'] -if version_info < (2, 7): - install_requires.append('ordereddict') - setup( name="pytest-xdist", @@ -27,6 +22,7 @@ setup( ], }, zip_safe=False, + python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*', install_requires=install_requires, setup_requires=['setuptools_scm'], classifiers=[ @@ -41,6 +37,11 @@ setup( 'Topic :: Software Development :: Quality Assurance', 'Topic :: Utilities', 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', ], ) diff --git a/tox.ini b/tox.ini index 8dca922..17a3138 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] # if you change the envlist, please update .travis.yml file as well envlist= - py{26,27,34,35,36}-pytest{30,31,32} + py{27,34,35,36}-pytest{30,31,32} py{27,36}-pytest{30,31,32}-pexpect py{27,36}-pytest{master,features} flakes diff --git a/xdist/scheduler/loadscope.py b/xdist/scheduler/loadscope.py index 4f5e5ff..95a3568 100644 --- a/xdist/scheduler/loadscope.py +++ b/xdist/scheduler/loadscope.py @@ -1,14 +1,9 @@ -try: - from collections import OrderedDict -except ImportError: - # Support for Python 2.6 - from ordereddict import OrderedDict +from collections import OrderedDict -from py.log import Producer from _pytest.runner import CollectReport - -from xdist.slavemanage import parse_spec_config +from py.log import Producer from xdist.report import report_collection_diff +from xdist.slavemanage import parse_spec_config class LoadScopeScheduling: From 2b0dc3f83af77eeaedd71e3dad62109966d277c9 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 10:59:52 +0200 Subject: [PATCH 3/7] Remove redundant Python 3.2 code --- xdist/remote.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xdist/remote.py b/xdist/remote.py index b35a9a7..554117b 100644 --- a/xdist/remote.py +++ b/xdist/remote.py @@ -178,10 +178,6 @@ def remote_initconfig(option_dict, args): if __name__ == '__channelexec__': channel = channel # noqa - # python3.2 is not concurrent import safe, so let's play it safe - # https://bitbucket.org/hpk42/pytest/issue/347/pytest-xdist-and-python-32 - if sys.version_info[:2] == (3, 2): - os.environ["PYTHONDONTWRITEBYTECODE"] = "1" slaveinput, args, option_dict = channel.receive() importpath = os.getcwd() sys.path.insert(0, importpath) # XXX only for remote situations From 8b79d909eae9adef87e867b97e0a6d36f777c80f Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 11:04:19 +0200 Subject: [PATCH 4/7] Rewrite unnecessary list literals as set literals --- testing/acceptance_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index f8f995f..99ee201 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -755,9 +755,9 @@ def test_worker_id_fixture(testdir, n): with open(fname) as f: worker_ids.add(f.read().strip()) if n == 0: - assert worker_ids == set(['master']) + assert worker_ids == {'master'} else: - assert worker_ids == set(['gw0', 'gw1']) + assert worker_ids == {'gw0', 'gw1'} @pytest.mark.parametrize('tb', From c6f2fdcc311ef4770ca2c56734a54d65c17eb005 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 11:19:58 +0200 Subject: [PATCH 5/7] Remove redundant parentheses --- testing/conftest.py | 2 +- testing/test_dsession.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/conftest.py b/testing/conftest.py index 0029b21..8d28ff8 100644 --- a/testing/conftest.py +++ b/testing/conftest.py @@ -34,7 +34,7 @@ def pytest_addoption(parser): parser.addoption('--gx', action="append", dest="gspecs", - help=("add a global test environment, XSpec-syntax. ")) + help="add a global test environment, XSpec-syntax. ") @pytest.fixture diff --git a/testing/test_dsession.py b/testing/test_dsession.py index e05d10f..2dcfc36 100644 --- a/testing/test_dsession.py +++ b/testing/test_dsession.py @@ -126,7 +126,7 @@ class TestLoadScheduling: sched.add_node(MockNode()) sched.add_node(MockNode()) node1, node2 = sched.nodes - col = ["xyz"] * (6) + col = ["xyz"] * 6 sched.add_node_collection(node1, col) sched.add_node_collection(node2, col) sched.schedule() From cec33cca8a967b76aa806328e50e45b12e3ce764 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 11:26:59 +0200 Subject: [PATCH 6/7] Add Python versions badge and alts to other badges --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.rst b/README.rst index 8833888..a7d332c 100644 --- a/README.rst +++ b/README.rst @@ -1,15 +1,23 @@ .. image:: http://img.shields.io/pypi/v/pytest-xdist.svg + :alt: PyPI version + :target: https://pypi.python.org/pypi/pytest-xdist + +.. image:: https://img.shields.io/pypi/pyversions/pytest-xdist.svg + :alt: Python versions :target: https://pypi.python.org/pypi/pytest-xdist .. image:: https://anaconda.org/conda-forge/pytest-xdist/badges/version.svg + :alt: Anaconda version :target: https://anaconda.org/conda-forge/pytest-xdist .. image:: https://travis-ci.org/pytest-dev/pytest-xdist.svg?branch=master + :alt: Travis CI build status :target: https://travis-ci.org/pytest-dev/pytest-xdist .. image:: https://ci.appveyor.com/api/projects/status/56eq1a1avd4sdd7e/branch/master?svg=true + :alt: AppVeyor build status :target: https://ci.appveyor.com/project/pytestbot/pytest-xdist xdist: pytest distributed testing plugin From cb8b161d365a13c4f2aae83a73100f082018a2b6 Mon Sep 17 00:00:00 2001 From: Hugo Date: Thu, 21 Dec 2017 11:31:38 +0200 Subject: [PATCH 7/7] Add towncrier changelog entry --- changelog/259.removal | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/259.removal diff --git a/changelog/259.removal b/changelog/259.removal new file mode 100644 index 0000000..110c9bc --- /dev/null +++ b/changelog/259.removal @@ -0,0 +1 @@ +Drop support for EOL Python 2.6. \ No newline at end of file