From 9e6e4a376a91d793443f1bfd1fb20edb7e2b0907 Mon Sep 17 00:00:00 2001 From: dgarcia <> Date: Sat, 10 Dec 2022 20:17:59 +0000 Subject: [PATCH] Update python-pytest-server-fixtures to version 1.7.0 / rev 8 via SR 1041859 https://build.opensuse.org/request/show/1041859 by user dgarcia + dimstar_suse - Remove remote path for pytest-plugins-pr186-fix-psycopg29.patch to avoid download that patch from github - Update source pytest-plugins-pr186-fix-psycopg29.patch - do not require six - use -p1 as quilt does not like higher - modified patches % pytest-plugins-pr186-fix-psycopg29.patch (refreshed) % remove-mock.patch (refreshed) - added patches fix https://github.com/man-group/pytest-plugins/issues/209 + python-pytest-server-fixtures-no-six.patch --- .../p/python-pytest-server-fixtures/.files | Bin 364 -> 444 bytes packages/p/python-pytest-server-fixtures/.rev | 19 ++++ .../pytest-plugins-pr186-fix-psycopg29.patch | 6 +- ...python-pytest-server-fixtures-no-six.patch | 103 ++++++++++++++++++ .../python-pytest-server-fixtures.changes | 23 ++++ .../python-pytest-server-fixtures.spec | 9 +- .../remove-mock.patch | 30 ++--- 7 files changed, 167 insertions(+), 23 deletions(-) create mode 100644 packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures-no-six.patch diff --git a/packages/p/python-pytest-server-fixtures/.files b/packages/p/python-pytest-server-fixtures/.files index 91fa5d6e2ac28b5e27eb3a0be6087357c2468dab..77ec30a7639574de62b394d9c1a145cdcf62fb95 100644 GIT binary patch delta 229 zcmWO0K~4iP3_#Hl6)ffgtU$8>B#?$Wv7I=_v7LmnX)8@7xW?RvBXI*3W%gfB|M%u+ z7tYHCZpYm)40q#XA(Dxhc7{+g)Lv2(cNQx`A#c_5dVPHLgC0NHGEUj5wj4#x)EFps zL3L&(Rg6v7`TmJ3ct*h7or)PWl8(WP6$Odp8~V0hANKR{G%ugu?`OUEVVr7+k^>ec oU^b8FEhG_i-(F(zwSG-5)>;$*N}MoNDJ>w0Ci9RJ=JoI8AH6_7MF0Q* delta 190 zcmWN~K?=e^3_#JMxarOdND&cSC`l$WO^!1&i3n0GDteCI$0KTfLsf{H&L@)0mPnB4F=XHD#4j zqHBVTm}{AS@10w%j2V>7lN2;J=%KgyQXzoO^mf9{{xN!OyJARSIgkQrpaPsjWFtJ2 J77>_^hd*eeG2#FK diff --git a/packages/p/python-pytest-server-fixtures/.rev b/packages/p/python-pytest-server-fixtures/.rev index 282a445a3b0..2fec5d2c9b5 100644 --- a/packages/p/python-pytest-server-fixtures/.rev +++ b/packages/p/python-pytest-server-fixtures/.rev @@ -56,4 +56,23 @@ 971975 + + a803c7fbd2fba99e7137141e1d9e2cae + 1.7.0 + + dimstar_suse + - Remove remote path for pytest-plugins-pr186-fix-psycopg29.patch to avoid + download that patch from github +- Update source pytest-plugins-pr186-fix-psycopg29.patch +- do not require six +- use -p1 as quilt does not like higher +- modified patches + % pytest-plugins-pr186-fix-psycopg29.patch (refreshed) + % remove-mock.patch (refreshed) +- added patches + fix https://github.com/man-group/pytest-plugins/issues/209 + + python-pytest-server-fixtures-no-six.patch + + 1041859 + diff --git a/packages/p/python-pytest-server-fixtures/pytest-plugins-pr186-fix-psycopg29.patch b/packages/p/python-pytest-server-fixtures/pytest-plugins-pr186-fix-psycopg29.patch index 68e82f0be8c..da91b09b8e2 100644 --- a/packages/p/python-pytest-server-fixtures/pytest-plugins-pr186-fix-psycopg29.patch +++ b/packages/p/python-pytest-server-fixtures/pytest-plugins-pr186-fix-psycopg29.patch @@ -11,9 +11,9 @@ https://github.com/psycopg/psycopg2/issues/941 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pytest-server-fixtures/pytest_server_fixtures/postgres.py b/pytest-server-fixtures/pytest_server_fixtures/postgres.py -index 7c6ea33..aeab36a 100644 ---- a/pytest-server-fixtures/pytest_server_fixtures/postgres.py -+++ b/pytest-server-fixtures/pytest_server_fixtures/postgres.py +index 7c6ea33d..aeab36ad 100644 +--- a/pytest_server_fixtures/postgres.py ++++ b/pytest_server_fixtures/postgres.py @@ -103,18 +103,22 @@ def run_cmd(self): def check_server_up(self): diff --git a/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures-no-six.patch b/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures-no-six.patch new file mode 100644 index 00000000000..ff6efa34e3e --- /dev/null +++ b/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures-no-six.patch @@ -0,0 +1,103 @@ +Index: pytest-server-fixtures-1.7.0/pytest_server_fixtures/base.py +=================================================================== +--- pytest-server-fixtures-1.7.0.orig/pytest_server_fixtures/base.py ++++ pytest-server-fixtures-1.7.0/pytest_server_fixtures/base.py +@@ -14,8 +14,6 @@ import logging + import random + import errno + +-from six import string_types +- + from pytest_server_fixtures import CONFIG + from pytest_shutil.workspace import Workspace + +@@ -109,7 +107,7 @@ class ProcessReader(threading.Thread): + def run(self): + while self.process.poll() is None: + l = self.stream.readline() +- if not isinstance(l, string_types): ++ if not isinstance(l, str): + l = l.decode('utf-8') + + if l.strip(): +Index: pytest-server-fixtures-1.7.0/pytest_server_fixtures/http.py +=================================================================== +--- pytest-server-fixtures-1.7.0.orig/pytest_server_fixtures/http.py ++++ pytest-server-fixtures-1.7.0/pytest_server_fixtures/http.py +@@ -9,7 +9,6 @@ import sys + import pytest + import requests + from contextlib import contextmanager +-from six.moves import http_client + + from pytest_shutil.env import unset_env + from pytest_server_fixtures import CONFIG +@@ -83,7 +82,7 @@ class HTTPTestServer(TestServer): + with self.handle_proxy(): + returned = requests.get('http://%s:%d/%s' % (self.hostname, self.port, path)) + return returned.json() if as_json else returned +- except (http_client.BadStatusLine, requests.ConnectionError) as e: ++ except (http.client.BadStatusLine, requests.ConnectionError) as e: + time.sleep(int(i) / 10) + pass + raise e +@@ -107,7 +106,7 @@ class HTTPTestServer(TestServer): + with self.handle_proxy(): + returned = requests.post('http://%s:%d/%s' % (self.hostname, self.port, path), data=data) + return returned.json() if as_json else returned +- except (http_client.BadStatusLine, requests.ConnectionError) as e: ++ except (http.client.BadStatusLine, requests.ConnectionError) as e: + time.sleep(int(i) / 10) + pass + raise e +Index: pytest-server-fixtures-1.7.0/pytest_server_fixtures/jenkins.py +=================================================================== +--- pytest-server-fixtures-1.7.0.orig/pytest_server_fixtures/jenkins.py ++++ pytest-server-fixtures-1.7.0/pytest_server_fixtures/jenkins.py +@@ -9,7 +9,6 @@ import os.path + import shutil + + import pytest +-import six + + from pytest_server_fixtures import CONFIG + from pytest_fixture_config import yield_requires_config +@@ -95,7 +94,7 @@ class JenkinsTestServer(HTTPTestServer): + if plugins is None: + plugins = available_plugins.keys() + else: +- if isinstance(plugins, six.string_types): ++ if isinstance(plugins, str): + plugins = [plugins] + + errors = [] +Index: pytest-server-fixtures-1.7.0/pytest_server_fixtures/postgres.py +=================================================================== +--- pytest-server-fixtures-1.7.0.orig/pytest_server_fixtures/postgres.py ++++ pytest-server-fixtures-1.7.0/pytest_server_fixtures/postgres.py +@@ -8,7 +8,6 @@ import subprocess + + import errno + import pytest +-from six import text_type + + from pytest_server_fixtures import CONFIG + from pytest_fixture_config import requires_config +@@ -65,7 +64,7 @@ class PostgresServer(TestServer): + try: + self.pg_bin = subprocess.check_output([CONFIG.pg_config_executable, "--bindir"]).decode('utf-8').rstrip() + except OSError as e: +- msg = "Failed to get pg_config --bindir: " + text_type(e) ++ msg = "Failed to get pg_config --bindir: " + str(e) + print(msg) + self._fail(msg) + initdb_path = self.pg_bin + '/initdb' +@@ -76,7 +75,7 @@ class PostgresServer(TestServer): + try: + subprocess.check_call([initdb_path, str(self.workspace / 'db')]) + except OSError as e: +- msg = "Failed to launch postgres: " + text_type(e) ++ msg = "Failed to launch postgres: " + str(e) + print(msg) + self._fail(msg) + diff --git a/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.changes b/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.changes index 00ce2442d7b..f2cefa681b4 100644 --- a/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.changes +++ b/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Fri Dec 9 12:03:36 UTC 2022 - Daniel Garcia + +- Remove remote path for pytest-plugins-pr186-fix-psycopg29.patch to avoid + download that patch from github + +------------------------------------------------------------------- +Fri Dec 9 11:57:05 UTC 2022 - Daniel Garcia + +- Update source pytest-plugins-pr186-fix-psycopg29.patch + +------------------------------------------------------------------- +Thu Dec 8 12:33:38 UTC 2022 - pgajdos@suse.com + +- do not require six +- use -p1 as quilt does not like higher +- modified patches + % pytest-plugins-pr186-fix-psycopg29.patch (refreshed) + % remove-mock.patch (refreshed) +- added patches + fix https://github.com/man-group/pytest-plugins/issues/209 + + python-pytest-server-fixtures-no-six.patch + ------------------------------------------------------------------- Thu Apr 21 20:21:33 UTC 2022 - Ben Greiner diff --git a/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.spec b/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.spec index 5ee3dcf4e0a..829ef745b25 100644 --- a/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.spec +++ b/packages/p/python-pytest-server-fixtures/python-pytest-server-fixtures.spec @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-pytest-server-fixtures Version: 1.7.0 @@ -27,9 +26,11 @@ Group: Development/Languages/Python URL: https://github.com/man-group/pytest-plugins Source: https://files.pythonhosted.org/packages/source/p/pytest-server-fixtures/pytest-server-fixtures-%{version}.tar.gz # PATCH-FIX-UPSTREAM pytest-plugins-pr186-fix-psycopg29.patch -- gh#man-group/pytest-plugins#186 -Patch0: https://github.com/man-group/pytest-plugins/pull/186.patch#/pytest-plugins-pr186-fix-psycopg29.patch +Patch0: pytest-plugins-pr186-fix-psycopg29.patch # PATCH-FEATURE-UPSTREAM remove-mock.patch -- gh#man-group#pytest-plugins#171 Patch1: remove-mock.patch +# https://github.com/man-group/pytest-plugins/issues/209 +Patch2: python-pytest-server-fixtures-no-six.patch BuildRequires: %{python_module setuptools-git} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -45,7 +46,6 @@ Requires: python-pytest-fixture-config Requires: python-pytest-shutil Requires: python-requests Requires: python-retry -Requires: python-six Suggests: apache2 Suggests: postgresql-server-devel Suggests: python-boto3 @@ -77,7 +77,6 @@ BuildRequires: %{python_module redis} BuildRequires: %{python_module requests} BuildRequires: %{python_module rethinkdb} BuildRequires: %{python_module retry} -BuildRequires: %{python_module six} %if %{with python2} BuildRequires: python2-mock %endif @@ -96,7 +95,7 @@ BuildRequires: xorg-x11-server Extensible server fixtures for pytest %prep -%autosetup -p2 -n pytest-server-fixtures-%{version} +%autosetup -p1 -n pytest-server-fixtures-%{version} # Tests requiring a server rm tests/integration/test_mongo_server.py diff --git a/packages/p/python-pytest-server-fixtures/remove-mock.patch b/packages/p/python-pytest-server-fixtures/remove-mock.patch index 588d5bd41bb..2f18177fe71 100644 --- a/packages/p/python-pytest-server-fixtures/remove-mock.patch +++ b/packages/p/python-pytest-server-fixtures/remove-mock.patch @@ -1,7 +1,7 @@ -Index: a/pytest-server-fixtures-1.7.0/tests/integration/test_xvfb_server.py +Index: a/tests/integration/test_xvfb_server.py =================================================================== ---- a/pytest-server-fixtures-1.7.0/tests/integration/test_xvfb_server.py -+++ b/pytest-server-fixtures-1.7.0/tests/integration/test_xvfb_server.py +--- a/tests/integration/test_xvfb_server.py ++++ b/tests/integration/test_xvfb_server.py @@ -4,7 +4,11 @@ import time from itertools import chain, repeat @@ -15,10 +15,10 @@ Index: a/pytest-server-fixtures-1.7.0/tests/integration/test_xvfb_server.py import pytest from pytest import raises -Index: a/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_docker_unit.py +Index: a/tests/unit/serverclass/test_docker_unit.py =================================================================== ---- a/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_docker_unit.py -+++ b/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_docker_unit.py +--- a/tests/unit/serverclass/test_docker_unit.py ++++ b/tests/unit/serverclass/test_docker_unit.py @@ -1,4 +1,8 @@ -from mock import sentinel, patch, Mock +try: @@ -29,10 +29,10 @@ Index: a/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_docker_unit.py from pytest_server_fixtures.serverclass.docker import DockerServer -Index: a/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_thread_unit.py +Index: a/tests/unit/serverclass/test_thread_unit.py =================================================================== ---- a/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_thread_unit.py -+++ b/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_thread_unit.py +--- a/tests/unit/serverclass/test_thread_unit.py ++++ b/tests/unit/serverclass/test_thread_unit.py @@ -1,4 +1,8 @@ -from mock import sentinel, patch, Mock +try: @@ -43,10 +43,10 @@ Index: a/pytest-server-fixtures-1.7.0/tests/unit/serverclass/test_thread_unit.py from pytest_server_fixtures import CONFIG from pytest_server_fixtures.serverclass.thread import ThreadServer -Index: a/pytest-server-fixtures-1.7.0/tests/unit/test_server_unit.py +Index: a/tests/unit/test_server_unit.py =================================================================== ---- a/pytest-server-fixtures-1.7.0/tests/unit/test_server_unit.py -+++ b/pytest-server-fixtures-1.7.0/tests/unit/test_server_unit.py +--- a/tests/unit/test_server_unit.py ++++ b/tests/unit/test_server_unit.py @@ -1,4 +1,8 @@ -from mock import create_autospec, sentinel, call, patch, Mock +try: @@ -57,10 +57,10 @@ Index: a/pytest-server-fixtures-1.7.0/tests/unit/test_server_unit.py from pytest_server_fixtures.base import TestServer as _TestServer # So that pytest doesnt think this is a test case -Index: pytest-server-fixtures-1.7.0/tests/unit/test_server_v2_unit.py +Index: tests/unit/test_server_v2_unit.py =================================================================== ---- a/pytest-server-fixtures-1.7.0/tests/unit/test_server_v2_unit.py -+++ b/pytest-server-fixtures-1.7.0/tests/unit/test_server_v2_unit.py +--- a/tests/unit/test_server_v2_unit.py ++++ b/tests/unit/test_server_v2_unit.py @@ -1,4 +1,8 @@ -from mock import create_autospec, sentinel, call, patch, Mock +try: