From b80d49803710dab6cb467fdb3f51e16bafa411deb520cd6b0f899cce348a3725 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 30 Jan 2014 14:01:53 +0000 Subject: [PATCH 1/3] - Added 0001-Depend-on-requests-2.0.1.patch: Require requests>=2.0.1. Really a requirement OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wsgi_intercept?expand=0&rev=11 --- 0001-Depend-on-requests-2.0.1.patch | 27 +++++++++++++++++++++++++++ python-wsgi_intercept.changes | 6 ++++++ python-wsgi_intercept.spec | 4 ++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 0001-Depend-on-requests-2.0.1.patch diff --git a/0001-Depend-on-requests-2.0.1.patch b/0001-Depend-on-requests-2.0.1.patch new file mode 100644 index 0000000..206818c --- /dev/null +++ b/0001-Depend-on-requests-2.0.1.patch @@ -0,0 +1,27 @@ +From 3a6fb4eafa2d9ea42bd3806a3eba51b07cb9c70c Mon Sep 17 00:00:00 2001 +From: Sascha Peilicke +Date: Thu, 30 Jan 2014 14:57:04 +0100 +Subject: [PATCH] Depend on requests>=2.0.1 + +requests.packages.urllib3.connection was added with 2.0.1 and is +imported by wsgi_intercept/requests_intercept.py. +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 0d62f78..f5ca681 100644 +--- a/setup.py ++++ b/setup.py +@@ -32,7 +32,7 @@ META = { + 'testing': [ + 'pytest>=2.4', + 'httplib2', +- 'requests' ++ 'requests>=2.0.1' + ], + }, + } +-- +1.8.5.2 + diff --git a/python-wsgi_intercept.changes b/python-wsgi_intercept.changes index 5927d9c..b12b68c 100644 --- a/python-wsgi_intercept.changes +++ b/python-wsgi_intercept.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 30 14:01:10 UTC 2014 - speilicke@suse.com + +- Added 0001-Depend-on-requests-2.0.1.patch: Require requests>=2.0.1. + Really a requirement + ------------------------------------------------------------------- Fri Jan 17 15:47:55 UTC 2014 - speilicke@suse.com diff --git a/python-wsgi_intercept.spec b/python-wsgi_intercept.spec index 3fb809d..4328f9f 100644 --- a/python-wsgi_intercept.spec +++ b/python-wsgi_intercept.spec @@ -30,8 +30,8 @@ BuildRequires: python-setuptools BuildRequires: python-httplib2 BuildRequires: python-nose BuildRequires: python-pytest >= 2.4 -BuildRequires: python-requests -Recommends: python-requests +BuildRequires: python-requests >= 2.0.1 +Recommends: python-requests >= 2.0.1 BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} From 0bb3a993a49a968628fb815ec63bc31f1d0b91c282420be0d01969426cead669 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 30 Jan 2014 15:24:51 +0000 Subject: [PATCH 2/3] - Update to version 0.6.1: + Better testing dependency structure - Dropped patches: + 0001-Depend-on-requests-2.0.1.patch (merged upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wsgi_intercept?expand=0&rev=12 --- 0001-Depend-on-requests-2.0.1.patch | 27 --------------------------- python-wsgi_intercept.changes | 8 ++++++++ python-wsgi_intercept.spec | 2 +- wsgi_intercept-0.6.0.tar.gz | 3 --- wsgi_intercept-0.6.1.tar.gz | 3 +++ 5 files changed, 12 insertions(+), 31 deletions(-) delete mode 100644 0001-Depend-on-requests-2.0.1.patch delete mode 100644 wsgi_intercept-0.6.0.tar.gz create mode 100644 wsgi_intercept-0.6.1.tar.gz diff --git a/0001-Depend-on-requests-2.0.1.patch b/0001-Depend-on-requests-2.0.1.patch deleted file mode 100644 index 206818c..0000000 --- a/0001-Depend-on-requests-2.0.1.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3a6fb4eafa2d9ea42bd3806a3eba51b07cb9c70c Mon Sep 17 00:00:00 2001 -From: Sascha Peilicke -Date: Thu, 30 Jan 2014 14:57:04 +0100 -Subject: [PATCH] Depend on requests>=2.0.1 - -requests.packages.urllib3.connection was added with 2.0.1 and is -imported by wsgi_intercept/requests_intercept.py. ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index 0d62f78..f5ca681 100644 ---- a/setup.py -+++ b/setup.py -@@ -32,7 +32,7 @@ META = { - 'testing': [ - 'pytest>=2.4', - 'httplib2', -- 'requests' -+ 'requests>=2.0.1' - ], - }, - } --- -1.8.5.2 - diff --git a/python-wsgi_intercept.changes b/python-wsgi_intercept.changes index b12b68c..b7ac864 100644 --- a/python-wsgi_intercept.changes +++ b/python-wsgi_intercept.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Jan 30 15:22:14 UTC 2014 - speilicke@suse.com + +- Update to version 0.6.1: + + Better testing dependency structure +- Dropped patches: + + 0001-Depend-on-requests-2.0.1.patch (merged upstream) + ------------------------------------------------------------------- Thu Jan 30 14:01:10 UTC 2014 - speilicke@suse.com diff --git a/python-wsgi_intercept.spec b/python-wsgi_intercept.spec index 4328f9f..af63fb2 100644 --- a/python-wsgi_intercept.spec +++ b/python-wsgi_intercept.spec @@ -17,7 +17,7 @@ Name: python-wsgi_intercept -Version: 0.6.0 +Version: 0.6.1 Release: 0 Summary: Installs a WSGI application in place of a real URI for testing License: MIT diff --git a/wsgi_intercept-0.6.0.tar.gz b/wsgi_intercept-0.6.0.tar.gz deleted file mode 100644 index 7c47907..0000000 --- a/wsgi_intercept-0.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fbee9bb0fe6aace0c6297d217bf9910a5099faa173e7e26f69246f5f59dc8754 -size 9830 diff --git a/wsgi_intercept-0.6.1.tar.gz b/wsgi_intercept-0.6.1.tar.gz new file mode 100644 index 0000000..c6512a0 --- /dev/null +++ b/wsgi_intercept-0.6.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:656d6cea9c513e1a5db963d5210d579846cca166b47a3c4fcdd0633ce01516e9 +size 9869 From 9504d16be13c08fb320c0b3971f9d72f25767f15b1082225068f1baa59e60b24 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Thu, 30 Jan 2014 16:44:55 +0000 Subject: [PATCH 3/3] - Added wsgi_intercept-disable-testbogusdomain.patch: Disable some tests on 12.3 where patching fails OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wsgi_intercept?expand=0&rev=13 --- python-wsgi_intercept.changes | 6 ++++++ python-wsgi_intercept.spec | 5 +++++ wsgi_intercept-disable-testbogusdomain.patch | 16 ++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 wsgi_intercept-disable-testbogusdomain.patch diff --git a/python-wsgi_intercept.changes b/python-wsgi_intercept.changes index b7ac864..6223205 100644 --- a/python-wsgi_intercept.changes +++ b/python-wsgi_intercept.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 30 16:44:30 UTC 2014 - speilicke@suse.com + +- Added wsgi_intercept-disable-testbogusdomain.patch: Disable some tests + on 12.3 where patching fails + ------------------------------------------------------------------- Thu Jan 30 15:22:14 UTC 2014 - speilicke@suse.com diff --git a/python-wsgi_intercept.spec b/python-wsgi_intercept.spec index af63fb2..fd720d2 100644 --- a/python-wsgi_intercept.spec +++ b/python-wsgi_intercept.spec @@ -24,6 +24,8 @@ License: MIT Group: Development/Languages/Python Url: http://code.google.com/p/wsgi-intercept/ Source: http://pypi.python.org/packages/source/w/wsgi_intercept/wsgi_intercept-%{version}.tar.gz +# PATCH-FIX-OPENSUSE speilicke@suse.com -- Patching fails +Patch0: wsgi_intercept-disable-testbogusdomain.patch BuildRequires: python-devel BuildRequires: python-setuptools # Test requirements: @@ -48,6 +50,9 @@ can avoid spawning multiple processes or threads to test your Web app. %prep %setup -q -n wsgi_intercept-%{version} +%if 0%{?suse_version} == 1230 +%patch0 -p1 +%endif %build python setup.py build diff --git a/wsgi_intercept-disable-testbogusdomain.patch b/wsgi_intercept-disable-testbogusdomain.patch new file mode 100644 index 0000000..9fead56 --- /dev/null +++ b/wsgi_intercept-disable-testbogusdomain.patch @@ -0,0 +1,16 @@ +diff -ruN a/test/test_httplib2.py b/test/test_httplib2.py +--- a/test/test_httplib2.py 2013-11-05 21:55:09.000000000 +0100 ++++ b/test/test_httplib2.py 2014-01-30 17:27:27.499618248 +0100 +@@ -28,12 +28,6 @@ + uninstall() + + +-def test_bogus_domain(): +- install() +- py.test.raises(gaierror, +- 'httplib2_intercept.HTTP_WSGIInterceptorWithTimeout("_nonexistant_domain_").connect()') +- uninstall() +- + + def test_https_success(): + install(443)