From 86c04629911af6869a5cc86b02f78678b1986f4bd85288545edaeb384e67bff4 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 17 May 2022 13:58:41 +0000 Subject: [PATCH 1/2] Accepting request 977787 from home:pgajdos:python - do not require python-mock for build - added patches fix https://github.com/mindflayer/python-mocket/issues/178 + python-mocket-no-mock.patch OBS-URL: https://build.opensuse.org/request/show/977787 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mocket?expand=0&rev=47 --- python-mocket-no-mock.patch | 12 ++++++++++++ python-mocket.changes | 8 ++++++++ python-mocket.spec | 4 +++- 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 python-mocket-no-mock.patch diff --git a/python-mocket-no-mock.patch b/python-mocket-no-mock.patch new file mode 100644 index 0000000..64a3111 --- /dev/null +++ b/python-mocket-no-mock.patch @@ -0,0 +1,12 @@ +diff -upr mocket-3.10.5.orig/tests/main/test_http.py mocket-3.10.5/tests/main/test_http.py +--- mocket-3.10.5.orig/tests/main/test_http.py 2022-05-17 15:23:49.159143686 +0200 ++++ mocket-3.10.5/tests/main/test_http.py 2022-05-17 15:23:49.163143712 +0200 +@@ -10,7 +10,7 @@ from urllib.error import HTTPError + from urllib.parse import urlencode + from urllib.request import urlopen + +-import mock ++from unittest import mock + import pytest + import requests + diff --git a/python-mocket.changes b/python-mocket.changes index 577fe6c..00fc691 100644 --- a/python-mocket.changes +++ b/python-mocket.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 17 13:29:27 UTC 2022 - pgajdos@suse.com + +- do not require python-mock for build +- added patches + fix https://github.com/mindflayer/python-mocket/issues/178 + + python-mocket-no-mock.patch + ------------------------------------------------------------------- Mon Apr 25 08:36:19 UTC 2022 - Sebastian Wagner diff --git a/python-mocket.spec b/python-mocket.spec index d4f5a08..1a9d403 100644 --- a/python-mocket.spec +++ b/python-mocket.spec @@ -35,6 +35,8 @@ URL: https://github.com/mindflayer/python-mocket Source0: https://files.pythonhosted.org/packages/source/m/mocket/mocket-%{version}.tar.gz # PATCH-FIX-OPENSUSE recording-urllib3-brotli.patch -- our urllib has different default headers than upstreams test reference, code@bnavigator.de Patch0: recording-urllib3-brotli.patch +# https://github.com/mindflayer/python-mocket/issues/178 +Patch1: python-mocket-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -57,7 +59,6 @@ BuildRequires: %{python_module cryptography} BuildRequires: %{python_module decorator} BuildRequires: %{python_module gevent} BuildRequires: %{python_module http-parser >= 0.9.0} -BuildRequires: %{python_module mock} BuildRequires: %{python_module pook} BuildRequires: %{python_module pyOpenSSL} BuildRequires: %{python_module pytest} @@ -83,6 +84,7 @@ sed -i '/pipenv/ d' setup.py # urllib3 in TW accepts Brotli encoding by default %patch0 -p1 %endif +%patch1 -p1 %build %if !%{with test} From f9b090fcefac719ec4d1585a9bdbcf0adc309b223458cdcae1c336be58b4acd3 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Wed, 18 May 2022 06:49:31 +0000 Subject: [PATCH 2/2] Accepting request 977873 from home:pgajdos:python - version update to 3.10.6 No need for the external mock dependency - deleted patches - python-mocket-no-mock.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/977873 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mocket?expand=0&rev=48 --- mocket-3.10.5.tar.gz | 3 --- mocket-3.10.6.tar.gz | 3 +++ python-mocket-no-mock.patch | 12 ------------ python-mocket.changes | 8 ++++++++ python-mocket.spec | 4 +--- 5 files changed, 12 insertions(+), 18 deletions(-) delete mode 100644 mocket-3.10.5.tar.gz create mode 100644 mocket-3.10.6.tar.gz delete mode 100644 python-mocket-no-mock.patch diff --git a/mocket-3.10.5.tar.gz b/mocket-3.10.5.tar.gz deleted file mode 100644 index 5ae410a..0000000 --- a/mocket-3.10.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac5ea89794fac07d2736668ffa51d02fc1fe5d9cf5925ece11eecd34ee0c0adc -size 76076 diff --git a/mocket-3.10.6.tar.gz b/mocket-3.10.6.tar.gz new file mode 100644 index 0000000..dbe6192 --- /dev/null +++ b/mocket-3.10.6.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a43e9688adce8030f65f2f6be7d28e07d4d3fcb36241afc35915c0fb0efaa1ef +size 76119 diff --git a/python-mocket-no-mock.patch b/python-mocket-no-mock.patch deleted file mode 100644 index 64a3111..0000000 --- a/python-mocket-no-mock.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -upr mocket-3.10.5.orig/tests/main/test_http.py mocket-3.10.5/tests/main/test_http.py ---- mocket-3.10.5.orig/tests/main/test_http.py 2022-05-17 15:23:49.159143686 +0200 -+++ mocket-3.10.5/tests/main/test_http.py 2022-05-17 15:23:49.163143712 +0200 -@@ -10,7 +10,7 @@ from urllib.error import HTTPError - from urllib.parse import urlencode - from urllib.request import urlopen - --import mock -+from unittest import mock - import pytest - import requests - diff --git a/python-mocket.changes b/python-mocket.changes index 00fc691..e76af59 100644 --- a/python-mocket.changes +++ b/python-mocket.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed May 18 06:31:34 UTC 2022 - pgajdos@suse.com + +- version update to 3.10.6 + No need for the external mock dependency +- deleted patches + - python-mocket-no-mock.patch (upstreamed) + ------------------------------------------------------------------- Tue May 17 13:29:27 UTC 2022 - pgajdos@suse.com diff --git a/python-mocket.spec b/python-mocket.spec index 1a9d403..5e6437b 100644 --- a/python-mocket.spec +++ b/python-mocket.spec @@ -27,7 +27,7 @@ %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-mocket%{psuffix} -Version: 3.10.5 +Version: 3.10.6 Release: 0 Summary: Python socket mock framework License: BSD-3-Clause @@ -36,7 +36,6 @@ Source0: https://files.pythonhosted.org/packages/source/m/mocket/mocket-% # PATCH-FIX-OPENSUSE recording-urllib3-brotli.patch -- our urllib has different default headers than upstreams test reference, code@bnavigator.de Patch0: recording-urllib3-brotli.patch # https://github.com/mindflayer/python-mocket/issues/178 -Patch1: python-mocket-no-mock.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -84,7 +83,6 @@ sed -i '/pipenv/ d' setup.py # urllib3 in TW accepts Brotli encoding by default %patch0 -p1 %endif -%patch1 -p1 %build %if !%{with test}