--- Begin Message ---
Source: python-wsgi-intercept
Version: 1.8.1-2
Severity: serious
Tags: ftbfs
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/python-wsgi-intercept.html
...
=================================== FAILURES ===================================
__________________________________ test_https __________________________________
def test_https():
with InstalledApp(wsgi_app.simple_app, host=HOST, port=443) as app:
http = httplib2.Http()
> resp, content = http.request(
'https://some_hopefully_nonexistant_domain:443/')
wsgi_intercept/tests/test_httplib2.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <httplib2.Http object at 0x7f345193d9d0>
uri = 'https://some_hopefully_nonexistant_domain:443/', method = 'GET'
body = None, headers = {'user-agent': 'Python-httplib2/0.14.0 (gzip)'}
redirections = 5
connection_type = <class
'wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout'>
def request(
self,
uri,
method="GET",
body=None,
headers=None,
redirections=DEFAULT_MAX_REDIRECTS,
connection_type=None,
):
""" Performs a single HTTP request.
The 'uri' is the URI of the HTTP resource and can begin
with either 'http' or 'https'. The value of 'uri' must be an absolute URI.
The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc.
There is no restriction on the methods allowed.
The 'body' is the entity body to be sent with the request. It is a string
object.
Any extra headers that are to be sent with the request should be provided
in the
'headers' dictionary.
The maximum number of redirect to follow before raising an
exception is 'redirections. The default is 5.
The return value is a tuple of (response, content), the first
being and instance of the 'Response' class, the second being
a string that contains the response entity body.
"""
conn_key = ''
try:
if headers is None:
headers = {}
else:
headers = self._normalize_headers(headers)
if "user-agent" not in headers:
headers["user-agent"] = "Python-httplib2/%s (gzip)" %
__version__
uri = iri2uri(uri)
(scheme, authority, request_uri, defrag_uri) = urlnorm(uri)
conn_key = scheme + ":" + authority
conn = self.connections.get(conn_key)
if conn is None:
if not connection_type:
connection_type = SCHEME_TO_CONNECTION[scheme]
certs = list(self.certificates.iter(authority))
if issubclass(connection_type, HTTPSConnectionWithTimeout):
if certs:
conn = self.connections[conn_key] = connection_type(
authority,
key_file=certs[0][0],
cert_file=certs[0][1],
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
else:
> conn = self.connections[conn_key] = connection_type(
authority,
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
E TypeError: __init__() got an unexpected keyword
argument 'tls_maximum_version'
/usr/lib/python3/dist-packages/httplib2/__init__.py:1787: TypeError
___________________________ test_https_default_port ____________________________
def test_https_default_port():
with InstalledApp(wsgi_app.simple_app, host=HOST, port=443) as app:
http = httplib2.Http()
> resp, content = http.request(
'https://some_hopefully_nonexistant_domain/')
wsgi_intercept/tests/test_httplib2.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <httplib2.Http object at 0x7f34519b7610>
uri = 'https://some_hopefully_nonexistant_domain/', method = 'GET', body = None
headers = {'user-agent': 'Python-httplib2/0.14.0 (gzip)'}, redirections = 5
connection_type = <class
'wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout'>
def request(
self,
uri,
method="GET",
body=None,
headers=None,
redirections=DEFAULT_MAX_REDIRECTS,
connection_type=None,
):
""" Performs a single HTTP request.
The 'uri' is the URI of the HTTP resource and can begin
with either 'http' or 'https'. The value of 'uri' must be an absolute URI.
The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc.
There is no restriction on the methods allowed.
The 'body' is the entity body to be sent with the request. It is a string
object.
Any extra headers that are to be sent with the request should be provided
in the
'headers' dictionary.
The maximum number of redirect to follow before raising an
exception is 'redirections. The default is 5.
The return value is a tuple of (response, content), the first
being and instance of the 'Response' class, the second being
a string that contains the response entity body.
"""
conn_key = ''
try:
if headers is None:
headers = {}
else:
headers = self._normalize_headers(headers)
if "user-agent" not in headers:
headers["user-agent"] = "Python-httplib2/%s (gzip)" %
__version__
uri = iri2uri(uri)
(scheme, authority, request_uri, defrag_uri) = urlnorm(uri)
conn_key = scheme + ":" + authority
conn = self.connections.get(conn_key)
if conn is None:
if not connection_type:
connection_type = SCHEME_TO_CONNECTION[scheme]
certs = list(self.certificates.iter(authority))
if issubclass(connection_type, HTTPSConnectionWithTimeout):
if certs:
conn = self.connections[conn_key] = connection_type(
authority,
key_file=certs[0][0],
cert_file=certs[0][1],
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
else:
> conn = self.connections[conn_key] = connection_type(
authority,
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
E TypeError: __init__() got an unexpected keyword
argument 'tls_maximum_version'
/usr/lib/python3/dist-packages/httplib2/__init__.py:1787: TypeError
_____________________ test_httplib2_interceptor_https_host _____________________
def test_httplib2_interceptor_https_host():
hostname = str(uuid4())
port = 443
http = Http()
with Httplib2Interceptor(app=app, host=hostname, port=port) as url:
assert url == 'https://%s' % hostname
> response, content = http.request(url)
wsgi_intercept/tests/test_interceptor.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <httplib2.Http object at 0x7f3451957ca0>
uri = 'https://a4c74d58-7806-45fc-ac7c-c2c6d0acc7e5', method = 'GET'
body = None, headers = {'user-agent': 'Python-httplib2/0.14.0 (gzip)'}
redirections = 5
connection_type = <class
'wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout'>
def request(
self,
uri,
method="GET",
body=None,
headers=None,
redirections=DEFAULT_MAX_REDIRECTS,
connection_type=None,
):
""" Performs a single HTTP request.
The 'uri' is the URI of the HTTP resource and can begin
with either 'http' or 'https'. The value of 'uri' must be an absolute URI.
The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc.
There is no restriction on the methods allowed.
The 'body' is the entity body to be sent with the request. It is a string
object.
Any extra headers that are to be sent with the request should be provided
in the
'headers' dictionary.
The maximum number of redirect to follow before raising an
exception is 'redirections. The default is 5.
The return value is a tuple of (response, content), the first
being and instance of the 'Response' class, the second being
a string that contains the response entity body.
"""
conn_key = ''
try:
if headers is None:
headers = {}
else:
headers = self._normalize_headers(headers)
if "user-agent" not in headers:
headers["user-agent"] = "Python-httplib2/%s (gzip)" %
__version__
uri = iri2uri(uri)
(scheme, authority, request_uri, defrag_uri) = urlnorm(uri)
conn_key = scheme + ":" + authority
conn = self.connections.get(conn_key)
if conn is None:
if not connection_type:
connection_type = SCHEME_TO_CONNECTION[scheme]
certs = list(self.certificates.iter(authority))
if issubclass(connection_type, HTTPSConnectionWithTimeout):
if certs:
conn = self.connections[conn_key] = connection_type(
authority,
key_file=certs[0][0],
cert_file=certs[0][1],
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
else:
> conn = self.connections[conn_key] = connection_type(
authority,
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
E TypeError: __init__() got an unexpected keyword
argument 'tls_maximum_version'
/usr/lib/python3/dist-packages/httplib2/__init__.py:1787: TypeError
____________________________ test_https_in_environ _____________________________
def test_https_in_environ():
with InstalledApp(wsgi_app.simple_app, host=HOST, port=443) as app:
http = httplib2.Http()
> resp, content = http.request(
'https://some_hopefully_nonexistant_domain/', 'GET')
wsgi_intercept/tests/test_wsgi_compliance.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <httplib2.Http object at 0x7f345191b5b0>
uri = 'https://some_hopefully_nonexistant_domain/', method = 'GET', body = None
headers = {'user-agent': 'Python-httplib2/0.14.0 (gzip)'}, redirections = 5
connection_type = <class
'wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout'>
def request(
self,
uri,
method="GET",
body=None,
headers=None,
redirections=DEFAULT_MAX_REDIRECTS,
connection_type=None,
):
""" Performs a single HTTP request.
The 'uri' is the URI of the HTTP resource and can begin
with either 'http' or 'https'. The value of 'uri' must be an absolute URI.
The 'method' is the HTTP method to perform, such as GET, POST, DELETE, etc.
There is no restriction on the methods allowed.
The 'body' is the entity body to be sent with the request. It is a string
object.
Any extra headers that are to be sent with the request should be provided
in the
'headers' dictionary.
The maximum number of redirect to follow before raising an
exception is 'redirections. The default is 5.
The return value is a tuple of (response, content), the first
being and instance of the 'Response' class, the second being
a string that contains the response entity body.
"""
conn_key = ''
try:
if headers is None:
headers = {}
else:
headers = self._normalize_headers(headers)
if "user-agent" not in headers:
headers["user-agent"] = "Python-httplib2/%s (gzip)" %
__version__
uri = iri2uri(uri)
(scheme, authority, request_uri, defrag_uri) = urlnorm(uri)
conn_key = scheme + ":" + authority
conn = self.connections.get(conn_key)
if conn is None:
if not connection_type:
connection_type = SCHEME_TO_CONNECTION[scheme]
certs = list(self.certificates.iter(authority))
if issubclass(connection_type, HTTPSConnectionWithTimeout):
if certs:
conn = self.connections[conn_key] = connection_type(
authority,
key_file=certs[0][0],
cert_file=certs[0][1],
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
else:
> conn = self.connections[conn_key] = connection_type(
authority,
timeout=self.timeout,
proxy_info=self.proxy_info,
ca_certs=self.ca_certs,
disable_ssl_certificate_validation=self.disable_ssl_certificate_validation,
tls_maximum_version=self.tls_maximum_version,
tls_minimum_version=self.tls_minimum_version,
)
E TypeError: __init__() got an unexpected keyword
argument 'tls_maximum_version'
/usr/lib/python3/dist-packages/httplib2/__init__.py:1787: TypeError
=============================== warnings summary ===============================
wsgi_intercept/tests/test_httplib2.py::test_bogus_domain
/build/1st/python-wsgi-intercept-1.8.1/wsgi_intercept/tests/test_httplib2.py:45:
PytestDeprecationWarning: raises(..., 'code(as_a_string)') is deprecated, use
the context manager form or use `exec()` directly
See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec
py.test.raises(
wsgi_intercept/tests/test_requests.py::test_bogus_domain
/build/1st/python-wsgi-intercept-1.8.1/wsgi_intercept/tests/test_requests.py:39:
PytestDeprecationWarning: raises(..., 'code(as_a_string)') is deprecated, use
the context manager form or use `exec()` directly
See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec
py.test.raises(
wsgi_intercept/tests/test_urllib3.py::test_bogus_domain
/build/1st/python-wsgi-intercept-1.8.1/wsgi_intercept/tests/test_urllib3.py:41:
PytestDeprecationWarning: raises(..., 'code(as_a_string)') is deprecated, use
the context manager form or use `exec()` directly
See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec
py.test.raises(
-- Docs: https://docs.pytest.org/en/latest/warnings.html
========== 4 failed, 65 passed, 8 skipped, 3 warnings in 0.95 seconds ==========
make[1]: *** [debian/rules:22: override_dh_auto_test] Error 1
--- End Message ---