forked from pool/python-wsgi_intercept
- Update to 1.9.0:
* Fix with new httplib2 included upstream - Remove patch httplib2.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wsgi_intercept?expand=0&rev=46
This commit is contained in:
committed by
Git OBS Bridge
parent
061bc67d87
commit
29d0a17e84
@@ -1,86 +0,0 @@
|
||||
From c4d44f5712e85d302db7e80e16156ca9c501bb6b Mon Sep 17 00:00:00 2001
|
||||
From: Chris Dent <cdent@anticdent.org>
|
||||
Date: Tue, 15 Oct 2019 12:10:10 +0100
|
||||
Subject: [PATCH] Updates for dependent library changes
|
||||
|
||||
httplib2 added some more kwargs, so rather than continuing
|
||||
to explicitly list each one (they are ignored), use **kwargs
|
||||
instead.
|
||||
|
||||
update some tests to work correctly with modern pytest, which
|
||||
no longer allows the string-as-callable to check for exceptions.
|
||||
Use py.test.raises context manager instead.
|
||||
|
||||
remove python versions that tox no longer supports
|
||||
---
|
||||
wsgi_intercept/httplib2_intercept.py | 3 +--
|
||||
wsgi_intercept/tests/test_httplib2.py | 7 +++----
|
||||
wsgi_intercept/tests/test_requests.py | 5 ++---
|
||||
wsgi_intercept/tests/test_urllib3.py | 6 ++----
|
||||
5 files changed, 9 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/wsgi_intercept/httplib2_intercept.py b/wsgi_intercept/httplib2_intercept.py
|
||||
index 1edbfbd..ae92a9d 100644
|
||||
--- a/wsgi_intercept/httplib2_intercept.py
|
||||
+++ b/wsgi_intercept/httplib2_intercept.py
|
||||
@@ -32,8 +32,7 @@ class HTTPS_WSGIInterceptorWithTimeout(HTTPSInterceptorMixin,
|
||||
HTTPSConnectionWithTimeout):
|
||||
def __init__(self, host, port=None, strict=None, timeout=None,
|
||||
proxy_info=None, ca_certs=None, source_address=None,
|
||||
- disable_ssl_certificate_validation=False,
|
||||
- ssl_version=None):
|
||||
+ **kwargs):
|
||||
|
||||
# ignore proxy_info and ca_certs
|
||||
# In Python3 strict is deprecated
|
||||
diff --git a/wsgi_intercept/tests/test_httplib2.py b/wsgi_intercept/tests/test_httplib2.py
|
||||
index 160cce4..0f1e177 100644
|
||||
--- a/wsgi_intercept/tests/test_httplib2.py
|
||||
+++ b/wsgi_intercept/tests/test_httplib2.py
|
||||
@@ -42,10 +42,9 @@ def test_http_other_port():
|
||||
|
||||
def test_bogus_domain():
|
||||
with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
|
||||
- py.test.raises(
|
||||
- gaierror,
|
||||
- 'httplib2_intercept.HTTP_WSGIInterceptorWithTimeout('
|
||||
- '"_nonexistant_domain_").connect()')
|
||||
+ with py.test.raises(gaierror):
|
||||
+ httplib2_intercept.HTTP_WSGIInterceptorWithTimeout(
|
||||
+ "_nonexistant_domain_").connect()
|
||||
|
||||
|
||||
def test_proxy_handling():
|
||||
diff --git a/wsgi_intercept/tests/test_requests.py b/wsgi_intercept/tests/test_requests.py
|
||||
index 8c09a37..4d69ba9 100644
|
||||
--- a/wsgi_intercept/tests/test_requests.py
|
||||
+++ b/wsgi_intercept/tests/test_requests.py
|
||||
@@ -36,9 +36,8 @@ def test_http_other_port():
|
||||
|
||||
def test_bogus_domain():
|
||||
with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
|
||||
- py.test.raises(
|
||||
- ConnectionError,
|
||||
- 'requests.get("http://_nonexistant_domain_")')
|
||||
+ with py.test.raises(ConnectionError):
|
||||
+ requests.get("http://_nonexistant_domain_")
|
||||
|
||||
|
||||
def test_proxy_handling():
|
||||
diff --git a/wsgi_intercept/tests/test_urllib3.py b/wsgi_intercept/tests/test_urllib3.py
|
||||
index 021b614..229a309 100644
|
||||
--- a/wsgi_intercept/tests/test_urllib3.py
|
||||
+++ b/wsgi_intercept/tests/test_urllib3.py
|
||||
@@ -38,10 +38,8 @@ def test_http_other_port():
|
||||
|
||||
def test_bogus_domain():
|
||||
with InstalledApp(wsgi_app.simple_app, host=HOST, port=80):
|
||||
- py.test.raises(
|
||||
- urllib3.exceptions.ProtocolError,
|
||||
- 'http.request("GET", "http://_nonexistant_domain_", '
|
||||
- 'retries=False)')
|
||||
+ with py.test.raises(urllib3.exceptions.ProtocolError):
|
||||
+ http.request("GET", "http://_nonexistant_domain_", retries=False)
|
||||
|
||||
|
||||
def test_proxy_handling():
|
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 6 12:22:52 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 1.9.0:
|
||||
* Fix with new httplib2 included upstream
|
||||
- Remove patch httplib2.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 15 11:19:10 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@@ -18,13 +18,12 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-wsgi_intercept
|
||||
Version: 1.8.1
|
||||
Version: 1.9.0
|
||||
Release: 0
|
||||
Summary: Library for installing a WSGI application in place of a real URI for testing
|
||||
License: MIT
|
||||
URL: https://github.com/cdent/python3-wsgi-intercept
|
||||
Source: https://files.pythonhosted.org/packages/source/w/wsgi_intercept/wsgi_intercept-%{version}.tar.gz
|
||||
Patch0: httplib2.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module httplib2}
|
||||
BuildRequires: %{python_module pytest >= 2.4}
|
||||
@@ -52,7 +51,6 @@ can avoid spawning multiple processes or threads to test your Web app.
|
||||
|
||||
%prep
|
||||
%setup -q -n wsgi_intercept-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:34de19ef24e1dbc496eec281b84aa87ef79035af82bb2792a47ec98deb2c4d4f
|
||||
size 28248
|
3
wsgi_intercept-1.9.0.tar.gz
Normal file
3
wsgi_intercept-1.9.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5a9f656bffa8aff446f3697d105f10de85e9ba0e0d4136322848e9792cbbb426
|
||||
size 28887
|
Reference in New Issue
Block a user