From 865b8e3c571b8c4c95c745e8337a182e2dd0a286 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 12 Mar 2018 13:10:28 +0200 Subject: [PATCH 1/6] Drop support for EOL Python 2.6 --- .travis.yml | 1 - appveyor.yml | 6 ------ setup.py | 1 - tox.ini | 4 +--- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 27aee42..b73c590 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - "2.7" - - "2.6" - "3.4" - "3.5" - "3.6" diff --git a/appveyor.yml b/appveyor.yml index 47ae3ad..4396f93 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,12 +2,6 @@ environment: VENV: "%APPVEYOR_BUILD_FOLDER%\\venv" matrix: - - TOXENV: py26 - PYTHON: "C:\\Python26" - - - TOXENV: py26 - PYTHON: "C:\\Python26-x64" - - TOXENV: py27 PYTHON: "C:\\Python27" diff --git a/setup.py b/setup.py index 112aab3..485fd30 100755 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ 'Programming Language :: Python', 'Topic :: Software Development :: Testing', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', diff --git a/tox.ini b/tox.ini index ce5f539..d11506c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist= - py{26,27,34}-defaultreactor + py{27,34}-defaultreactor py{35,36}-{default,qt5}reactor linting @@ -8,9 +8,7 @@ envlist= [testenv] deps= greenlet - py26: pytest<3.3 py{27,34,35,36}: pytest - py26: twisted<15.5 py{27,34,35,36}: twisted qt5reactor: pytest-qt qt5reactor: qt5reactor From 04e28372681de5e09507796000a43151f7a1385f Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 12 Mar 2018 13:11:21 +0200 Subject: [PATCH 2/6] Use automatic formatters (py2.7+) --- pytest_twisted.py | 2 +- testing/test_basic.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pytest_twisted.py b/pytest_twisted.py index 284acb6..7602d4e 100644 --- a/pytest_twisted.py +++ b/pytest_twisted.py @@ -172,7 +172,7 @@ def _install_reactor(reactor_installer, reactor_type): import twisted.internet.reactor if not isinstance(twisted.internet.reactor, reactor_type): raise WrongReactorAlreadyInstalledError( - 'expected {0} but found {1}'.format( + 'expected {} but found {}'.format( reactor_type, type(twisted.internet.reactor), ) diff --git a/testing/test_basic.py b/testing/test_basic.py index 2eec78b..365f4be 100755 --- a/testing/test_basic.py +++ b/testing/test_basic.py @@ -22,9 +22,9 @@ def format_run_result_output_for_assert(run_result): return textwrap.dedent('''\ ---- stdout - {0} + {} ---- stderr - {1} + {} ----''').format( run_result.stdout.str(), run_result.stderr.str(), @@ -35,7 +35,7 @@ def skip_if_reactor_not(expected_reactor): actual_reactor = pytest.config.getoption('reactor') return pytest.mark.skipif( actual_reactor != expected_reactor, - reason='reactor is {0} not {1}'.format( + reason='reactor is {} not {}'.format( actual_reactor, expected_reactor, ), From 810113afd355ee8c76e9c267054d0ce9ac5f28f5 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 12 Mar 2018 13:17:13 +0200 Subject: [PATCH 3/6] Rewrite unnecessary dict call as literal --- pytest_twisted.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_twisted.py b/pytest_twisted.py index 7602d4e..638e24a 100644 --- a/pytest_twisted.py +++ b/pytest_twisted.py @@ -23,7 +23,7 @@ class _instances: def pytest_namespace(): - return dict(inlineCallbacks=inlineCallbacks, blockon=blockon) + return {'inlineCallbacks': inlineCallbacks, 'blockon': blockon} def blockon(d): From 44e308c15510c878b4de2a86e4bd66cbc177550e Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 12 Mar 2018 13:35:00 +0200 Subject: [PATCH 4/6] Add PyPI version badge --- README.rst | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 47028a9..f181763 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ pytest-twisted - test twisted code with pytest ============================================================================== -|Travis|_ |AppVeyor|_ |Pythons| +|PyPI| |Pythons| |Travis|_ |AppVeyor|_ :Authors: Ralf Schmitt, Kyle Altendorf, Victor Titor :Version: 1.7.1 @@ -88,6 +88,12 @@ corotwine work with pytest-twisted:: That's all. +.. |PyPI| image:: https://img.shields.io/pypi/v/pytest-twisted.svg + :target: https://pypi.python.org/pypi/pytest-twisted + +.. |Pythons| image:: https://img.shields.io/pypi/pyversions/pytest-twisted.svg + :alt: supported Python versions + .. |Travis| image:: https://travis-ci.org/pytest-dev/pytest-twisted.svg?branch=master :alt: Travis build status .. _Travis: https://travis-ci.org/pytest-dev/pytest-twisted @@ -96,7 +102,4 @@ That's all. :alt: AppVeyor build status .. _AppVeyor: https://ci.appveyor.com/project/vtitor/pytest-twisted -.. |Pythons| image:: https://img.shields.io/pypi/pyversions/pytest-twisted.svg - :alt: supported Python versions - .. _guide: CONTRIBUTING.rst From 3da3b7f4df03c7ce4f52e8dde659e6fbccb82ba6 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 12 Mar 2018 16:41:45 +0200 Subject: [PATCH 5/6] Simplify dependencies --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index d11506c..afb6c31 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,8 @@ envlist= [testenv] deps= greenlet - py{27,34,35,36}: pytest - py{27,34,35,36}: twisted + pytest + twisted qt5reactor: pytest-qt qt5reactor: qt5reactor qt5reactor: pytest-xvfb From 11e67789db09c6ee219978665e9437fbfc981ba0 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 12 Mar 2018 16:47:48 +0200 Subject: [PATCH 6/6] Standardise badges' RST markup --- README.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index f181763..b757bc2 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ pytest-twisted - test twisted code with pytest ============================================================================== -|PyPI| |Pythons| |Travis|_ |AppVeyor|_ +|PyPI| |Pythons| |Travis| |AppVeyor| :Authors: Ralf Schmitt, Kyle Altendorf, Victor Titor :Version: 1.7.1 @@ -89,17 +89,19 @@ That's all. .. |PyPI| image:: https://img.shields.io/pypi/v/pytest-twisted.svg - :target: https://pypi.python.org/pypi/pytest-twisted + :alt: PyPI version + :target: https://pypi.python.org/pypi/pytest-twisted .. |Pythons| image:: https://img.shields.io/pypi/pyversions/pytest-twisted.svg - :alt: supported Python versions + :alt: Supported Python versions + :target: https://pypi.python.org/pypi/pytest-twisted .. |Travis| image:: https://travis-ci.org/pytest-dev/pytest-twisted.svg?branch=master :alt: Travis build status -.. _Travis: https://travis-ci.org/pytest-dev/pytest-twisted + :target: https://travis-ci.org/pytest-dev/pytest-twisted .. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/us5l0l9p7hyp2k6x/branch/master?svg=true :alt: AppVeyor build status -.. _AppVeyor: https://ci.appveyor.com/project/vtitor/pytest-twisted + :target: https://ci.appveyor.com/project/vtitor/pytest-twisted .. _guide: CONTRIBUTING.rst