From cc017ff766267e7667658e8c4194525c6785896e Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 5 Mar 2019 14:56:32 -0500 Subject: [PATCH 01/14] ci: Test against Python 3.7 --- .circleci/config.yml | 7 +++++++ CHANGES.md | 3 ++- pytest-devpi-server/setup.py | 1 + pytest-fixture-config/setup.py | 1 + pytest-git/setup.py | 1 + pytest-listener/setup.py | 1 + pytest-profiling/setup.py | 1 + pytest-pyramid-server/setup.py | 1 + pytest-qt-app/setup.py | 1 + pytest-server-fixtures/setup.py | 1 + pytest-shutil/setup.py | 1 + pytest-svn/setup.py | 1 + pytest-verbose-parametrize/setup.py | 1 + pytest-virtualenv/setup.py | 1 + pytest-webdriver/setup.py | 1 + 15 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70fe7d76..b9f590d6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,6 +148,11 @@ jobs: environment: PYTHON: "python3.6" + py37: + <<: *job-tmpl + environment: + PYTHON: "python3.7" + coveralls: docker: - image: buildpack-deps:trusty @@ -164,9 +169,11 @@ workflows: - py34 - py35 - py36 + - py37 - coveralls: requires: - py27 - py34 - py35 - py36 + - py37 diff --git a/CHANGES.md b/CHANGES.md index b48df205..574072ba 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,8 @@ ## Changelog ### 1.7.0 - * pytest-server-fixtures: if host not defined, use localhost + * pytest-server-fixtures: if host not defined, use localhost + * circleci: Test against Python 3.7 ### 1.6.2 (2019-02-21) * pytest-server-fixtures: suppress stacktrace if kill() is called diff --git a/pytest-devpi-server/setup.py b/pytest-devpi-server/setup.py index 99ce424e..eb2f9b59 100644 --- a/pytest-devpi-server/setup.py +++ b/pytest-devpi-server/setup.py @@ -20,6 +20,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest-server-fixtures', diff --git a/pytest-fixture-config/setup.py b/pytest-fixture-config/setup.py index e7ecb085..1c584ac6 100644 --- a/pytest-fixture-config/setup.py +++ b/pytest-fixture-config/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest<4.0.0'] diff --git a/pytest-git/setup.py b/pytest-git/setup.py index 1b9a6c5d..2d04f534 100644 --- a/pytest-git/setup.py +++ b/pytest-git/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest<4.0.0', diff --git a/pytest-listener/setup.py b/pytest-listener/setup.py index 7eada6c9..84f4371a 100644 --- a/pytest-listener/setup.py +++ b/pytest-listener/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['six', diff --git a/pytest-profiling/setup.py b/pytest-profiling/setup.py index 8e0c9683..7d10c1d8 100644 --- a/pytest-profiling/setup.py +++ b/pytest-profiling/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['six', diff --git a/pytest-pyramid-server/setup.py b/pytest-pyramid-server/setup.py index 5a525f94..336f9c8d 100644 --- a/pytest-pyramid-server/setup.py +++ b/pytest-pyramid-server/setup.py @@ -20,6 +20,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] diff --git a/pytest-qt-app/setup.py b/pytest-qt-app/setup.py index 5065823d..46017320 100644 --- a/pytest-qt-app/setup.py +++ b/pytest-qt-app/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest<4.0.0', diff --git a/pytest-server-fixtures/setup.py b/pytest-server-fixtures/setup.py index bea6cb94..2bc24a09 100644 --- a/pytest-server-fixtures/setup.py +++ b/pytest-server-fixtures/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest<4.0.0', diff --git a/pytest-shutil/setup.py b/pytest-shutil/setup.py index 6edddb80..7702cc50 100644 --- a/pytest-shutil/setup.py +++ b/pytest-shutil/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['six', diff --git a/pytest-svn/setup.py b/pytest-svn/setup.py index b26d78d6..a14b3d30 100644 --- a/pytest-svn/setup.py +++ b/pytest-svn/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest<4.0.0', diff --git a/pytest-verbose-parametrize/setup.py b/pytest-verbose-parametrize/setup.py index 75c048e2..f445a9b4 100644 --- a/pytest-verbose-parametrize/setup.py +++ b/pytest-verbose-parametrize/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest<4.0.0', diff --git a/pytest-virtualenv/setup.py b/pytest-virtualenv/setup.py index a41d3590..8a3d6623 100644 --- a/pytest-virtualenv/setup.py +++ b/pytest-virtualenv/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['pytest-fixture-config', diff --git a/pytest-webdriver/setup.py b/pytest-webdriver/setup.py index e7a3eb9b..76f0ffbc 100644 --- a/pytest-webdriver/setup.py +++ b/pytest-webdriver/setup.py @@ -19,6 +19,7 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] install_requires = ['py', From 175271e9d14c42816c42a968ef9f1b9e88d60d32 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 5 Mar 2019 15:58:02 -0500 Subject: [PATCH 02/14] ci: Skip Coveralls submission if COVERALLS_REPO_TOKEN env. var is empty --- .circleci/config.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b9f590d6..130cb784 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -118,7 +118,11 @@ job-tmpl: &job-tmpl coverage report pip install urllib3[secure] pip install coveralls - CIRCLE_BUILD_NUM=$CIRCLE_WORKFLOW_ID coveralls + if [[ "$COVERALLS_REPO_TOKEN" != "" ]]; then + CIRCLE_BUILD_NUM=$CIRCLE_WORKFLOW_ID coveralls + else + echo "Skipping Coveralls" + fi - store_test_results: path: junit @@ -159,7 +163,12 @@ jobs: steps: - run: name: Complete Coveralls - command: curl --fail https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_ID&payload[status]=done" + command: | + if [[ "$COVERALLS_REPO_TOKEN" != "" ]]; then + curl --fail https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_ID&payload[status]=done" + else + echo "Skipping Coveralls" + fi workflows: version: 2 From f91b89343e6f4701ac919ee97a942fd1073e6aa5 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 5 Mar 2019 17:45:30 -0500 Subject: [PATCH 03/14] ci: Update circleci image to allow install of python 3.7 See https://circleci.com/docs/2.0/configuration-reference/#machine --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 130cb784..4dbe5292 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,8 @@ test-tmpl: &test-tmpl cat *.egg-info/top_level.txt | xargs -Ipysrc coverage run -p --source=pysrc setup.py test -sv -ra || touch ../FAILED-$(basename $PWD) job-tmpl: &job-tmpl - machine: true + machine: + image: circleci/classic:201808-01 working_directory: ~/src From 884e5b597af0ae90cb579592f35763e3c068cc87 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 01:22:01 -0500 Subject: [PATCH 04/14] pytest-server-fixture: Fix rethinkdb tests requiring rethinkdb < 2.4.0 The current implementation needs to be refactored to support the latest release of rethinkdb-python package. See #132 --- Makefile | 2 +- pytest-server-fixtures/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6fa1ddb5..acc4d9e7 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ EXTRA_DEPS = pypandoc \ pymongo \ psycopg2 \ boto3 \ - rethinkdb \ + "rethinkdb<2.4.0" \ docker \ kubernetes diff --git a/pytest-server-fixtures/setup.py b/pytest-server-fixtures/setup.py index 2bc24a09..d66d47ba 100644 --- a/pytest-server-fixtures/setup.py +++ b/pytest-server-fixtures/setup.py @@ -36,7 +36,7 @@ 'jenkins': ["python-jenkins"], 'mongodb': ["pymongo>=3.6.0"], 'postgres': ["psycopg2"], - 'rethinkdb': ["rethinkdb"], + 'rethinkdb': ["rethinkdb<2.4.0"], 'redis': ["redis"], 's3': ["boto3"], 'docker': ["docker"], From deded3b836aac047641a3475a32901b65f9bbeed Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 01:53:30 -0500 Subject: [PATCH 05/14] wheels: Generate universal wheels installable with both python 2.x and 3.x See #125 --- pytest-devpi-server/setup.cfg | 13 ++++++++----- pytest-fixture-config/setup.cfg | 13 ++++++++----- pytest-git/setup.cfg | 13 ++++++++----- pytest-listener/setup.cfg | 13 ++++++++----- pytest-profiling/setup.cfg | 11 +++++++---- pytest-pyramid-server/setup.cfg | 13 ++++++++----- pytest-qt-app/setup.cfg | 13 ++++++++----- pytest-server-fixtures/setup.cfg | 13 ++++++++----- pytest-shutil/setup.cfg | 13 ++++++++----- pytest-svn/setup.cfg | 13 ++++++++----- pytest-verbose-parametrize/setup.cfg | 13 ++++++++----- pytest-virtualenv/setup.cfg | 13 ++++++++----- pytest-webdriver/setup.cfg | 13 ++++++++----- 13 files changed, 103 insertions(+), 64 deletions(-) diff --git a/pytest-devpi-server/setup.cfg b/pytest-devpi-server/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-devpi-server/setup.cfg +++ b/pytest-devpi-server/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-fixture-config/setup.cfg b/pytest-fixture-config/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-fixture-config/setup.cfg +++ b/pytest-fixture-config/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-git/setup.cfg b/pytest-git/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-git/setup.cfg +++ b/pytest-git/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-listener/setup.cfg b/pytest-listener/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-listener/setup.cfg +++ b/pytest-listener/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-profiling/setup.cfg b/pytest-profiling/setup.cfg index 5561bc60..42f78507 100644 --- a/pytest-profiling/setup.cfg +++ b/pytest-profiling/setup.cfg @@ -1,9 +1,12 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build +norecursedirs = + .git + *.egg + build dist tests/integration/profile/tests + +[bdist_wheel] +universal = 1 diff --git a/pytest-pyramid-server/setup.cfg b/pytest-pyramid-server/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-pyramid-server/setup.cfg +++ b/pytest-pyramid-server/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-qt-app/setup.cfg b/pytest-qt-app/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-qt-app/setup.cfg +++ b/pytest-qt-app/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-server-fixtures/setup.cfg b/pytest-server-fixtures/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-server-fixtures/setup.cfg +++ b/pytest-server-fixtures/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-shutil/setup.cfg b/pytest-shutil/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-shutil/setup.cfg +++ b/pytest-shutil/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-svn/setup.cfg b/pytest-svn/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-svn/setup.cfg +++ b/pytest-svn/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-verbose-parametrize/setup.cfg b/pytest-verbose-parametrize/setup.cfg index b329e506..fd97b8b4 100644 --- a/pytest-verbose-parametrize/setup.cfg +++ b/pytest-verbose-parametrize/setup.cfg @@ -1,9 +1,12 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build +norecursedirs = + .git + *.egg + build dist - tests/integration/parametrize_ids \ No newline at end of file + tests/integration/parametrize_ids + +[bdist_wheel] +universal = 1 diff --git a/pytest-virtualenv/setup.cfg b/pytest-virtualenv/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-virtualenv/setup.cfg +++ b/pytest-virtualenv/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 diff --git a/pytest-webdriver/setup.cfg b/pytest-webdriver/setup.cfg index c399fae9..204ac858 100644 --- a/pytest-webdriver/setup.cfg +++ b/pytest-webdriver/setup.cfg @@ -1,8 +1,11 @@ [tool:pytest] # This section sets configuration for all invocations of py.test, # both standalone cmdline and running via setup.py -norecursedirs = - .git - *.egg - build - dist \ No newline at end of file +norecursedirs = + .git + *.egg + build + dist + +[bdist_wheel] +universal = 1 From 4e7a660e93b059ba4efeb4d24a9b47b7b20dc4fa Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 02:21:51 -0500 Subject: [PATCH 06/14] Fix DeprecationWarning warnings using "logger.warning()" function --- pytest-server-fixtures/pytest_server_fixtures/rethink.py | 2 +- pytest-shutil/pytest_shutil/cmdline.py | 2 +- pytest-shutil/pytest_shutil/run.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pytest-server-fixtures/pytest_server_fixtures/rethink.py b/pytest-server-fixtures/pytest_server_fixtures/rethink.py index e96ccf8a..40388c67 100644 --- a/pytest-server-fixtures/pytest_server_fixtures/rethink.py +++ b/pytest-server-fixtures/pytest_server_fixtures/rethink.py @@ -178,5 +178,5 @@ def check_server_up(self): port=self.port, db='test') return True except rethinkdb.RqlDriverError as err: - log.warn(err) + log.warning(err) return False diff --git a/pytest-shutil/pytest_shutil/cmdline.py b/pytest-shutil/pytest_shutil/cmdline.py index a60378cb..4e878a9e 100644 --- a/pytest-shutil/pytest_shutil/cmdline.py +++ b/pytest-shutil/pytest_shutil/cmdline.py @@ -40,7 +40,7 @@ def chdir(dirname): try: here = os.getcwd() except OSError: - get_log().warn("CWD has gone away, will chdir to back to '/'") + get_log().warning("CWD has gone away, will chdir to back to '/'") here = '/' try: os.chdir(dirname) diff --git a/pytest-shutil/pytest_shutil/run.py b/pytest-shutil/pytest_shutil/run.py index 9dd6acfd..c5b421d9 100644 --- a/pytest-shutil/pytest_shutil/run.py +++ b/pytest-shutil/pytest_shutil/run.py @@ -67,7 +67,7 @@ def run(cmd, stdin=None, capture_stdout=True, capture_stderr=False, try: out = out.decode('utf-8') except: - log.warn("Unable to decode command output to UTF-8") + log.warning("Unable to decode command output to UTF-8") if check_rc and p.returncode != 0: err_msg = ((out if out else 'No output') if capture_stdout is True From 472a16d9342dc20a3ae1b087519df61d8f5fbce2 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 02:29:14 -0500 Subject: [PATCH 07/14] pytest-virtualenv: Add virtualenv as install requirement. Fixes #122 --- pytest-virtualenv/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytest-virtualenv/setup.py b/pytest-virtualenv/setup.py index 8a3d6623..55552d11 100644 --- a/pytest-virtualenv/setup.py +++ b/pytest-virtualenv/setup.py @@ -25,6 +25,7 @@ install_requires = ['pytest-fixture-config', 'pytest-shutil', 'pytest<4.0.0', + 'virtualenv', ] tests_require = [ From 6382e770b45c280c0dfa415df40d710544cd3cca Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 02:37:39 -0500 Subject: [PATCH 08/14] Remove requirement for pytest<4.0.0 See #100 --- pytest-devpi-server/setup.py | 2 +- pytest-fixture-config/setup.py | 2 +- pytest-git/setup.py | 2 +- pytest-listener/setup.py | 2 +- pytest-profiling/setup.py | 2 +- pytest-pyramid-server/setup.py | 2 +- pytest-qt-app/setup.py | 2 +- pytest-server-fixtures/setup.py | 2 +- pytest-shutil/setup.py | 2 +- pytest-svn/setup.py | 2 +- pytest-verbose-parametrize/setup.py | 2 +- pytest-virtualenv/setup.py | 2 +- pytest-webdriver/setup.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pytest-devpi-server/setup.py b/pytest-devpi-server/setup.py index eb2f9b59..9d201e77 100644 --- a/pytest-devpi-server/setup.py +++ b/pytest-devpi-server/setup.py @@ -24,7 +24,7 @@ ] install_requires = ['pytest-server-fixtures', - 'pytest<4.0.0', + 'pytest', 'devpi-server>=3.0.1', 'devpi-client', 'six', diff --git a/pytest-fixture-config/setup.py b/pytest-fixture-config/setup.py index 1c584ac6..276be8bd 100644 --- a/pytest-fixture-config/setup.py +++ b/pytest-fixture-config/setup.py @@ -22,7 +22,7 @@ 'Programming Language :: Python :: 3.7', ] -install_requires = ['pytest<4.0.0'] +install_requires = ['pytest'] tests_require = ['six', ] diff --git a/pytest-git/setup.py b/pytest-git/setup.py index 2d04f534..b1d04c17 100644 --- a/pytest-git/setup.py +++ b/pytest-git/setup.py @@ -22,7 +22,7 @@ 'Programming Language :: Python :: 3.7', ] -install_requires = ['pytest<4.0.0', +install_requires = ['pytest', 'pytest-shutil', 'gitpython', ] diff --git a/pytest-listener/setup.py b/pytest-listener/setup.py index 84f4371a..ae09aca1 100644 --- a/pytest-listener/setup.py +++ b/pytest-listener/setup.py @@ -23,7 +23,7 @@ ] install_requires = ['six', - 'pytest<4.0.0', + 'pytest', 'pytest-server-fixtures' ] diff --git a/pytest-profiling/setup.py b/pytest-profiling/setup.py index 7d10c1d8..9964eb36 100644 --- a/pytest-profiling/setup.py +++ b/pytest-profiling/setup.py @@ -23,7 +23,7 @@ ] install_requires = ['six', - 'pytest<4.0.0', + 'pytest', 'gprof2dot', ] diff --git a/pytest-pyramid-server/setup.py b/pytest-pyramid-server/setup.py index 336f9c8d..6242be2d 100644 --- a/pytest-pyramid-server/setup.py +++ b/pytest-pyramid-server/setup.py @@ -25,7 +25,7 @@ install_requires = ['pytest-server-fixtures', - 'pytest<4.0.0', + 'pytest', 'pyramid', 'waitress', 'six', diff --git a/pytest-qt-app/setup.py b/pytest-qt-app/setup.py index 46017320..a596eab1 100644 --- a/pytest-qt-app/setup.py +++ b/pytest-qt-app/setup.py @@ -22,7 +22,7 @@ 'Programming Language :: Python :: 3.7', ] -install_requires = ['pytest<4.0.0', +install_requires = ['pytest', 'pytest-server-fixtures', 'pytest-shutil', ] diff --git a/pytest-server-fixtures/setup.py b/pytest-server-fixtures/setup.py index d66d47ba..09fd82c8 100644 --- a/pytest-server-fixtures/setup.py +++ b/pytest-server-fixtures/setup.py @@ -22,7 +22,7 @@ 'Programming Language :: Python :: 3.7', ] -install_requires = ['pytest<4.0.0', +install_requires = ['pytest', 'pytest-shutil', 'pytest-fixture-config', 'six', diff --git a/pytest-shutil/setup.py b/pytest-shutil/setup.py index 7702cc50..70cc3542 100644 --- a/pytest-shutil/setup.py +++ b/pytest-shutil/setup.py @@ -25,7 +25,7 @@ install_requires = ['six', 'execnet', 'contextlib2', - 'pytest<4.0.0', + 'pytest', 'path.py', 'mock', 'termcolor' diff --git a/pytest-svn/setup.py b/pytest-svn/setup.py index a14b3d30..f4768a49 100644 --- a/pytest-svn/setup.py +++ b/pytest-svn/setup.py @@ -22,7 +22,7 @@ 'Programming Language :: Python :: 3.7', ] -install_requires = ['pytest<4.0.0', +install_requires = ['pytest', 'pytest-shutil', ] diff --git a/pytest-verbose-parametrize/setup.py b/pytest-verbose-parametrize/setup.py index f445a9b4..c1e7aabe 100644 --- a/pytest-verbose-parametrize/setup.py +++ b/pytest-verbose-parametrize/setup.py @@ -22,7 +22,7 @@ 'Programming Language :: Python :: 3.7', ] -install_requires = ['pytest<4.0.0', +install_requires = ['pytest', 'six', ] diff --git a/pytest-virtualenv/setup.py b/pytest-virtualenv/setup.py index 55552d11..2b8d9539 100644 --- a/pytest-virtualenv/setup.py +++ b/pytest-virtualenv/setup.py @@ -24,7 +24,7 @@ install_requires = ['pytest-fixture-config', 'pytest-shutil', - 'pytest<4.0.0', + 'pytest', 'virtualenv', ] diff --git a/pytest-webdriver/setup.py b/pytest-webdriver/setup.py index 76f0ffbc..cb2dc598 100644 --- a/pytest-webdriver/setup.py +++ b/pytest-webdriver/setup.py @@ -23,7 +23,7 @@ ] install_requires = ['py', - 'pytest<4.0.0', + 'pytest', 'pytest-fixture-config', 'selenium', ] From bab99b5e0c968feda3e099bfa8e706d98a5b74ea Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 11:05:46 -0500 Subject: [PATCH 09/14] pytest-webdriver: Fix RemovedInPytest4Warning using getfixturevalue This commit fixes the following error: > root_uri.append(request.getfuncargvalue('pyramid_server').uri) E RemovedInPytest4Warning: getfuncargvalue is deprecated, use getfixturevalue pytest_webdriver.py:62: RemovedInPytest4Warning See #100 --- pytest-webdriver/pytest_webdriver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest-webdriver/pytest_webdriver.py b/pytest-webdriver/pytest_webdriver.py index b37916d5..4a1427f2 100644 --- a/pytest-webdriver/pytest_webdriver.py +++ b/pytest-webdriver/pytest_webdriver.py @@ -59,7 +59,7 @@ def webdriver(request): # Look for the pyramid server funcarg in the current session, and save away its root uri root_uri = [] try: - root_uri.append(request.getfuncargvalue('pyramid_server').uri) + root_uri.append(request.getfixturevalue('pyramid_server').uri) except LookupError: pass From 23188138262d0b4742849cfb889e1eb138689773 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 17:50:49 -0500 Subject: [PATCH 10/14] pytest-verbose-parametrize: Add support for revamped marker infrastructure This commit fixes tests failing with pytest > 4.0.0 --- .../pytest_verbose_parametrize.py | 13 +++++++++++-- .../tests/unit/test_verbose_parametrize.py | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/pytest-verbose-parametrize/pytest_verbose_parametrize.py b/pytest-verbose-parametrize/pytest_verbose_parametrize.py index c8132c74..eeecb4a6 100644 --- a/pytest-verbose-parametrize/pytest_verbose_parametrize.py +++ b/pytest-verbose-parametrize/pytest_verbose_parametrize.py @@ -13,10 +13,19 @@ def _strize_arg(arg): def pytest_generate_tests(metafunc): + try: - markers = metafunc.function.parametrize + markers = metafunc.definition.get_closest_marker('parametrize') + if not markers: + return except AttributeError: - return + # Deprecated in pytest >= 3.6 + # See https://docs.pytest.org/en/latest/mark.html#marker-revamp-and-iteration + try: + markers = metafunc.function.parametrize + except AttributeError: + return + if 'ids' not in markers.kwargs: list_names = [] for i, argvalue in enumerate(markers.args[1]): diff --git a/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py b/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py index c8c4a23f..fcce01d8 100644 --- a/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py +++ b/pytest-verbose-parametrize/tests/unit/test_verbose_parametrize.py @@ -8,9 +8,11 @@ def get_metafunc(args): p = Mock(kwargs={}, args=args) p._arglist = ([args, {}],) metafunc = Mock() - metafunc.function.parametrize = p + metafunc.function.parametrize = p # Deprecated + metafunc.definition.get_closest_marker.return_value = p return metafunc + def test_generates_ids_from_tuple(): metafunc = get_metafunc((None, [(1, 2, 3)])) pytest_generate_tests(metafunc) From 3c54816a03c9612ef4a8c9e58f50eb10b03197b7 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 18:41:32 -0500 Subject: [PATCH 11/14] pytest-verbose-parametrize: Fix integration tests to support pytest >= 4.1.0 This commit updates tests to support version of pytest with pytest-dev/pytest@e9b2475e2 (Display actual test ids in `--collect-only`) --- .../tests/integration/test_verbose_parametrize.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pytest-verbose-parametrize/tests/integration/test_verbose_parametrize.py b/pytest-verbose-parametrize/tests/integration/test_verbose_parametrize.py index 5005b5c8..5876250c 100644 --- a/pytest-verbose-parametrize/tests/integration/test_verbose_parametrize.py +++ b/pytest-verbose-parametrize/tests/integration/test_verbose_parametrize.py @@ -9,6 +9,17 @@ PYTEST = os.path.join(os.path.dirname(sys.executable), 'py.test') +def _update_expected(expected, output): + """If pytest >= 4.1.0 is used, remove single quotes from expected output. + + This function allows to successfully assert output using version of pytest + with or without pytest-dev/pytest@e9b2475e2 (Display actual test ids in `--collect-only`) + introduced in version 4.1.0. + """ + pytest_410_and_above = ".py'>" not in output + return expected.replace("'", "") if pytest_410_and_above else expected + + def test_parametrize_ids_generates_ids(pytestconfig): output = run_with_coverage([PYTEST, '--collectonly', 'tests/unit/test_parametrized.py'], pytestconfig, cd=TEST_DIR) @@ -16,6 +27,7 @@ def test_parametrize_ids_generates_ids(pytestconfig): ''' + expected = _update_expected(expected, output) assert expected in output @@ -25,6 +37,7 @@ def test_parametrize_ids_leaves_nonparametrized(pytestconfig): expected = ''' ''' + expected = _update_expected(expected, output) assert expected in output @@ -36,6 +49,7 @@ def test_handles_apparent_duplicates(pytestconfig): ''' + expected = _update_expected(expected, output) assert expected in output @@ -45,4 +59,5 @@ def test_truncates_long_ids(pytestconfig): expected = ''' ''' + expected = _update_expected(expected, output) assert expected in output From dd239fd9aa4ed1c1dfb7f21d2b8952b9ac4ebb90 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 7 Mar 2019 18:56:07 -0500 Subject: [PATCH 12/14] dist: Remove support for building and distributing *.egg files Wheel is currently considered the standard for built and binary packaging for Python See https://packaging.python.org/discussions/wheel-vs-egg/ See #125 --- Makefile | 5 +---- pytest-devpi-server/README.md | 2 -- pytest-fixture-config/README.md | 2 -- pytest-git/README.md | 2 -- pytest-listener/README.md | 2 -- pytest-profiling/README.md | 2 -- pytest-pyramid-server/README.md | 2 -- pytest-qt-app/README.md | 2 -- pytest-shutil/README.md | 4 +--- pytest-svn/README.md | 2 -- pytest-verbose-parametrize/README.md | 2 -- pytest-virtualenv/README.md | 2 -- pytest-webdriver/README.md | 2 -- 13 files changed, 2 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index acc4d9e7..448c469c 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ COPY_FILES = VERSION CHANGES.md common_setup.py MANIFEST.in LICENSE UPLOAD_OPTS = # removed from PHONY: circleci_sip circleci_pyqt -.PHONY: extras copyfiles wheels eggs sdists install develop test upload clean +.PHONY: extras copyfiles wheels sdists install develop test upload clean extras: pip install $(EXTRA_DEPS) @@ -28,9 +28,6 @@ wheels: copyfiles pip install -U wheel ./foreach.sh --changed 'python setup.py bdist_wheel' -eggs: copyfiles - ./foreach.sh --changed 'python setup.py bdist_egg' - sdists: copyfiles ./foreach.sh --changed 'python setup.py sdist' diff --git a/pytest-devpi-server/README.md b/pytest-devpi-server/README.md index defb94e4..2ce41642 100644 --- a/pytest-devpi-server/README.md +++ b/pytest-devpi-server/README.md @@ -13,8 +13,6 @@ Install using your favourite package manager: ```bash pip install pytest-devpi-server - # or.. - easy_install pytest-devpi-server ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-fixture-config/README.md b/pytest-fixture-config/README.md index 1518875e..85d06e6a 100644 --- a/pytest-fixture-config/README.md +++ b/pytest-fixture-config/README.md @@ -9,8 +9,6 @@ Install using your favourite package manager: ```bash pip install pytest-fixture-config - # or.. - easy_install pytest-fixture-config ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-git/README.md b/pytest-git/README.md index bd9a7769..c9d5c5bd 100644 --- a/pytest-git/README.md +++ b/pytest-git/README.md @@ -7,8 +7,6 @@ Creates an empty Git repository for testing that cleans up after itself on teard Install using your favourite package installer: ```bash pip install pytest-git - # or - easy_install pytest-git ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-listener/README.md b/pytest-listener/README.md index 05c40a94..21b42884 100644 --- a/pytest-listener/README.md +++ b/pytest-listener/README.md @@ -8,8 +8,6 @@ Install using your favourite package manager: ```bash pip install pytest-listener - # or.. - easy_install pytest-listener ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-profiling/README.md b/pytest-profiling/README.md index c367b940..490efba9 100644 --- a/pytest-profiling/README.md +++ b/pytest-profiling/README.md @@ -13,8 +13,6 @@ generated using [gprof2dot](http://code.google.com/p/jrfonseca/wiki/Gprof2Dot) a Install using your favourite package installer: ```bash pip install pytest-profiling - # or - easy_install pytest-profiling ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-pyramid-server/README.md b/pytest-pyramid-server/README.md index 212cbd59..67c39eb5 100644 --- a/pytest-pyramid-server/README.md +++ b/pytest-pyramid-server/README.md @@ -10,8 +10,6 @@ Install using your favourite package manager: ```bash pip install pytest-pyramid-server - # or.. - easy_install pytest-pyramid-server ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-qt-app/README.md b/pytest-qt-app/README.md index 01d20375..e51f0a1a 100644 --- a/pytest-qt-app/README.md +++ b/pytest-qt-app/README.md @@ -7,8 +7,6 @@ Set up a Q Application for QT with an X-Window Virtual Framebuffer (Xvfb). Install using your favourite package installer: ```bash pip install pytest-qt-app - # or - easy_install pytest-qt-app ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-shutil/README.md b/pytest-shutil/README.md index c34c5337..7214a90e 100644 --- a/pytest-shutil/README.md +++ b/pytest-shutil/README.md @@ -10,9 +10,7 @@ Install using your favourite package manager:: ```bash pip install pytest-shutil - # or.. - easy_install pytest-shutil -``` +``` ## Workspace Fixture diff --git a/pytest-svn/README.md b/pytest-svn/README.md index 53c7584b..308bdb20 100644 --- a/pytest-svn/README.md +++ b/pytest-svn/README.md @@ -7,8 +7,6 @@ Creates an empty SVN repository for testing that cleans up after itself on teard Install using your favourite package installer: ```bash pip install pytest-svn - # or - easy_install pytest-svn ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-verbose-parametrize/README.md b/pytest-verbose-parametrize/README.md index fde7229a..35b5a12c 100644 --- a/pytest-verbose-parametrize/README.md +++ b/pytest-verbose-parametrize/README.md @@ -8,8 +8,6 @@ more descriptive than the default (which just outputs id numbers). Install with your favourite package manager, and this plugin will automatically be enabled: ```bash pip install pytest-verbose-parametrize -# or .. -easy_install pytest-verbose-parametrize ``` ## Usage diff --git a/pytest-virtualenv/README.md b/pytest-virtualenv/README.md index d6e6c112..60d37160 100644 --- a/pytest-virtualenv/README.md +++ b/pytest-virtualenv/README.md @@ -8,8 +8,6 @@ The fixture has utility methods to install packages and list what's installed. Install using your favourite package installer: ```bash pip install pytest-virtualenv - # or - easy_install pytest-virtualenv ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): diff --git a/pytest-webdriver/README.md b/pytest-webdriver/README.md index 7243e872..780658e5 100644 --- a/pytest-webdriver/README.md +++ b/pytest-webdriver/README.md @@ -9,8 +9,6 @@ on test failures. Install using your favourite package installer: ```bash pip install pytest-webdriver - # or - easy_install pytest-webdriver ``` Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points): From 1fe1b61f850d452eb0d3dbfa5ceea8141f1d71b8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sat, 9 Mar 2019 01:01:28 -0500 Subject: [PATCH 13/14] VagrantFile: Install python 3.7 and initialize python 3.7 by default --- Vagrantfile | 2 +- install.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 2ed45969..529ec056 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -18,5 +18,5 @@ Vagrant.configure("2") do |config| config.vm.provision "docker" config.vm.provision "file", source: "install.sh", destination: "/tmp/install.sh" config.vm.provision "shell", inline: ". /tmp/install.sh && install_all" - config.vm.provision "shell", inline: ". /tmp/install.sh && init_venv python2.7", privileged: false + config.vm.provision "shell", inline: ". /tmp/install.sh && init_venv python3.7", privileged: false end diff --git a/install.sh b/install.sh index e8450aaf..7ffcd3dd 100644 --- a/install.sh +++ b/install.sh @@ -140,6 +140,7 @@ function install_all { install_python python3.4 install_python python3.5 install_python python3.6 + install_python python3.7 update_apt_sources install_system_deps From 3453df8511984ef034ea1352536f21cc345fb6ad Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Sat, 9 Mar 2019 01:08:07 -0500 Subject: [PATCH 14/14] Update CHANGES.md [ci skip] --- CHANGES.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 574072ba..74af090c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,17 @@ ### 1.7.0 * pytest-server-fixtures: if host not defined, use localhost * circleci: Test against Python 3.7 + * circleci: Fix checks by skipping coverall submission for developer without push access + * pytest-server-fixture: Fix rethinkdb tests requiring rethinkdb < 2.4.0 + * wheels: Generate universal wheels installable with both python 2.x and 3.x + * Fix DeprecationWarning warnings using "logger.warning()" function + * pytest-virtualenv: Add virtualenv as install requirement. Fixes #122 + * Remove requirement for pytest<4.0.0 + * pytest-webdriver: Fix RemovedInPytest4Warning using getfixturevalue + * pytest-verbose-parametrize: Add support for revamped marker infrastructure + * pytest-verbose-parametrize: Fix integration tests to support pytest >= 4.1.0 + * dist: Remove support for building and distributing *.egg files + * VagrantFile: Install python 3.7 and initialize python 3.7 by default ### 1.6.2 (2019-02-21) * pytest-server-fixtures: suppress stacktrace if kill() is called