Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 479110 Details for
Bug 623356
dev-python/wsgiintercept-1.3.1 : fails with FEATURES=test
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
dev-python:wsgiintercept-1.3.1:20170701-180931.log
dev-python:wsgiintercept-1.3.1:20170701-180931.log (text/plain), 42.26 KB, created by
Toralf Förster
on 2017-07-01 18:15:24 UTC
(
hide
)
Description:
dev-python:wsgiintercept-1.3.1:20170701-180931.log
Filename:
MIME Type:
Creator:
Toralf Förster
Created:
2017-07-01 18:15:24 UTC
Size:
42.26 KB
patch
obsolete
> * Package: dev-python/wsgiintercept-1.3.1 > * Repository: gentoo > * Maintainer: python@gentoo.org > * Upstream: https://code.google.com/p/wsgi-intercept/issues/list > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python2_7 python_targets_python3_4 test userland_GNU > * FEATURES: network-sandbox preserve-libs sandbox test userpriv usersandbox >>>> Unpacking source... >>>> Unpacking wsgi_intercept-1.3.1.tar.gz to /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work >>>> Source unpacked in /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work >>>> Preparing source in /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1 ... >>>> Source prepared. >>>> Configuring source in /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1 ... >>>> Source configured. >>>> Compiling source in /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1 ... > * python2_7: running distutils-r1_run_phase distutils-r1_python_compile >/usr/bin/python2.7 setup.py build >running build >running build_py >creating /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/urllib_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/requests_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/urllib3_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/http_client_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/httplib2_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/__init__.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/_urllib3.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >copying wsgi_intercept/interceptor.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python2_7/lib/wsgi_intercept >warning: build_py: byte-compiling is disabled, skipping. > > * python3_4: running distutils-r1_run_phase distutils-r1_python_compile >/usr/bin/python3.4 setup.py build >running build >running build_py >creating /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/urllib_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/requests_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/urllib3_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/http_client_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/httplib2_intercept.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/__init__.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/_urllib3.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >copying wsgi_intercept/interceptor.py -> /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1-python3_4/lib/wsgi_intercept >warning: build_py: byte-compiling is disabled, skipping. > > * python3_4: running distutils-r1_run_phase python_compile_all >>>> Source compiled. >>>> Test phase: dev-python/wsgiintercept-1.3.1 > * python2_7: running distutils-r1_run_phase python_test >============================= test session starts ============================== >platform linux2 -- Python 2.7.13, pytest-3.1.2, py-1.4.33, pluggy-0.4.0 >rootdir: /var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1, inifile: >plugins: xprocess-0.9.1, timeout-1.2.0, subtesthack-0.1.1, mock-1.6.0, localserver-0.3.7, httpbin-0.2.3, expect-1.1.0, catchlog-1.2.2, arraydiff-0.1, flaky-3.1.1, case-1.5.2 >collected 65 items > >test/test_http_client.py ..... >test/test_httplib2.py .....FF. >test/test_interceptor.py .....F........F... >test/test_module_interceptor.py .. >test/test_requests.py ........ >test/test_urllib.py ....... >test/test_urllib3.py ...F....FF >test/test_wsgi_compliance.py ..F.... >===Flaky Test Report=== > > >===End Flaky Test Report=== > >=================================== 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/') > >test/test_httplib2.py:66: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <httplib2.Http object at 0x7f38396c5d50> >uri = 'https://some_hopefully_nonexistant_domain:443/', method = 'GET' >body = None, headers = {'user-agent': 'Python-httplib2/0.10.3 (gzip)'} >redirections = 5 >connection_type = <class wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout at 0x7f383a5e4808> > > 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. > """ > try: > if headers is None: > headers = {} > else: > headers = self._normalize_headers(headers) > > if not headers.has_key('user-agent'): > headers['user-agent'] = "Python-httplib2/%s (gzip)" % __version__ > > uri = iri2uri(uri) > > (scheme, authority, request_uri, defrag_uri) = urlnorm(uri) > domain_port = authority.split(":")[0:2] > if len(domain_port) == 2 and domain_port[1] == '443' and scheme == 'http': > scheme = 'https' > authority = domain_port[0] > > proxy_info = self._get_proxy_info(scheme, authority) > > conn_key = scheme+":"+authority > if conn_key in self.connections: > conn = self.connections[conn_key] > else: > if not connection_type: > connection_type = SCHEME_TO_CONNECTION[scheme] > certs = list(self.certificates.iter(authority)) > if scheme == 'https': > 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=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, > ssl_version=self.ssl_version) > else: > conn = self.connections[conn_key] = connection_type( > authority, timeout=self.timeout, > proxy_info=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, >> ssl_version=self.ssl_version) >E TypeError: __init__() got an unexpected keyword argument 'ssl_version' > >/usr/lib64/python2.7/site-packages/httplib2/__init__.py:1537: 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/') > >test/test_httplib2.py:74: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <httplib2.Http object at 0x7f38396bb9d0> >uri = 'https://some_hopefully_nonexistant_domain/', method = 'GET', body = None >headers = {'user-agent': 'Python-httplib2/0.10.3 (gzip)'}, redirections = 5 >connection_type = <class wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout at 0x7f383a5e4808> > > 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. > """ > try: > if headers is None: > headers = {} > else: > headers = self._normalize_headers(headers) > > if not headers.has_key('user-agent'): > headers['user-agent'] = "Python-httplib2/%s (gzip)" % __version__ > > uri = iri2uri(uri) > > (scheme, authority, request_uri, defrag_uri) = urlnorm(uri) > domain_port = authority.split(":")[0:2] > if len(domain_port) == 2 and domain_port[1] == '443' and scheme == 'http': > scheme = 'https' > authority = domain_port[0] > > proxy_info = self._get_proxy_info(scheme, authority) > > conn_key = scheme+":"+authority > if conn_key in self.connections: > conn = self.connections[conn_key] > else: > if not connection_type: > connection_type = SCHEME_TO_CONNECTION[scheme] > certs = list(self.certificates.iter(authority)) > if scheme == 'https': > 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=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, > ssl_version=self.ssl_version) > else: > conn = self.connections[conn_key] = connection_type( > authority, timeout=self.timeout, > proxy_info=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, >> ssl_version=self.ssl_version) >E TypeError: __init__() got an unexpected keyword argument 'ssl_version' > >/usr/lib64/python2.7/site-packages/httplib2/__init__.py:1537: 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) > >test/test_interceptor.py:111: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <httplib2.Http object at 0x7f383963e110> >uri = 'https://8d422a3b-7505-4024-a271-5abed1f08c0a', method = 'GET' >body = None, headers = {'user-agent': 'Python-httplib2/0.10.3 (gzip)'} >redirections = 5 >connection_type = <class wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout at 0x7f383a5e4808> > > 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. > """ > try: > if headers is None: > headers = {} > else: > headers = self._normalize_headers(headers) > > if not headers.has_key('user-agent'): > headers['user-agent'] = "Python-httplib2/%s (gzip)" % __version__ > > uri = iri2uri(uri) > > (scheme, authority, request_uri, defrag_uri) = urlnorm(uri) > domain_port = authority.split(":")[0:2] > if len(domain_port) == 2 and domain_port[1] == '443' and scheme == 'http': > scheme = 'https' > authority = domain_port[0] > > proxy_info = self._get_proxy_info(scheme, authority) > > conn_key = scheme+":"+authority > if conn_key in self.connections: > conn = self.connections[conn_key] > else: > if not connection_type: > connection_type = SCHEME_TO_CONNECTION[scheme] > certs = list(self.certificates.iter(authority)) > if scheme == 'https': > 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=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, > ssl_version=self.ssl_version) > else: > conn = self.connections[conn_key] = connection_type( > authority, timeout=self.timeout, > proxy_info=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, >> ssl_version=self.ssl_version) >E TypeError: __init__() got an unexpected keyword argument 'ssl_version' > >/usr/lib64/python2.7/site-packages/httplib2/__init__.py:1537: TypeError >_____________________________ test_urllib3_in_out ______________________________ > > def test_urllib3_in_out(): > hostname = str(uuid4()) > port = 9999 > url = 'http://%s:%s/' % (hostname, port) > with Urllib3Interceptor(app=app, url=url) as target_url: > response = httppool.request('GET', target_url) > assert response.status == 200 > assert 'WSGI intercept successful!' in str(response.data) > > # outside the context manager the intercept does not work > with py.test.raises(urllib3.exceptions.ProtocolError): >> httppool.request('GET', url, retries=False) > >test/test_interceptor.py:219: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/usr/lib64/python2.7/site-packages/urllib3/request.py:66: in request > **urlopen_kw) >/usr/lib64/python2.7/site-packages/urllib3/request.py:87: in request_encode_url > return self.urlopen(method, url, **extra_kw) >/usr/lib64/python2.7/site-packages/urllib3/poolmanager.py:321: in urlopen > response = conn.urlopen(method, u.request_uri, **kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:649: in urlopen > _stacktrace=sys.exc_info()[2]) >/usr/lib64/python2.7/site-packages/urllib3/util/retry.py:333: in increment > raise six.reraise(type(error), error, _stacktrace) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:600: in urlopen > chunked=chunked) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:356: in _make_request > conn.request(method, url, **httplib_request_kw) >/usr/lib64/python2.7/httplib.py:1042: in request > self._send_request(method, url, body, headers) >/usr/lib64/python2.7/httplib.py:1082: in _send_request > self.endheaders(body) >/usr/lib64/python2.7/httplib.py:1038: in endheaders > self._send_output(message_body) >/usr/lib64/python2.7/httplib.py:882: in _send_output > self.send(msg) >/usr/lib64/python2.7/httplib.py:844: in send > self.connect() >wsgi_intercept/__init__.py:546: in connect > HTTPConnection.connect(self) >/usr/lib64/python2.7/httplib.py:821: in connect > self.timeout, self.source_address) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >address = ('c1c8a0d1-7711-44e1-8814-98020f47c689', 9999) >timeout = <object object at 0x7f3843d2c0e0>, source_address = None > > def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, > source_address=None): > """Connect to *address* and return the socket object. > > Convenience function. Connect to *address* (a 2-tuple ``(host, > port)``) and return the socket object. Passing the optional > *timeout* parameter will set the timeout on the socket instance > before attempting to connect. If no *timeout* is supplied, the > global default timeout setting returned by :func:`getdefaulttimeout` > is used. If *source_address* is set it must be a tuple of (host, port) > for the socket to bind as a source address before making the connection. > A host of '' or port 0 tells the OS to use the default. > """ > > host, port = address > err = None >> for res in getaddrinfo(host, port, 0, SOCK_STREAM): >E ProtocolError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution')) > >/usr/lib64/python2.7/socket.py:557: ProtocolError >------------------------------ Captured log call ------------------------------- >connectionpool.py 207 DEBUG Starting new HTTP connection (1): c1c8a0d1-7711-44e1-8814-98020f47c689 >connectionpool.py 395 DEBUG http://c1c8a0d1-7711-44e1-8814-98020f47c689:9999 "GET / HTTP/1.1" 200 None >retry.py 200 DEBUG Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None) >connectionpool.py 242 DEBUG Resetting dropped connection: c1c8a0d1-7711-44e1-8814-98020f47c689 >______________________________ test_bogus_domain _______________________________ > > 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)') > >test/test_urllib3.py:42: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ><2-codegen /usr/lib64/python2.7/site-packages/_pytest/python.py:1219>:1: in <module> > http.request("GET", "http://_nonexistant_domain_", retries=False) >/usr/lib64/python2.7/site-packages/urllib3/request.py:66: in request > **urlopen_kw) >/usr/lib64/python2.7/site-packages/urllib3/request.py:87: in request_encode_url > return self.urlopen(method, url, **extra_kw) >/usr/lib64/python2.7/site-packages/urllib3/poolmanager.py:321: in urlopen > response = conn.urlopen(method, u.request_uri, **kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:649: in urlopen > _stacktrace=sys.exc_info()[2]) >/usr/lib64/python2.7/site-packages/urllib3/util/retry.py:333: in increment > raise six.reraise(type(error), error, _stacktrace) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:600: in urlopen > chunked=chunked) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:356: in _make_request > conn.request(method, url, **httplib_request_kw) >/usr/lib64/python2.7/httplib.py:1042: in request > self._send_request(method, url, body, headers) >/usr/lib64/python2.7/httplib.py:1082: in _send_request > self.endheaders(body) >/usr/lib64/python2.7/httplib.py:1038: in endheaders > self._send_output(message_body) >/usr/lib64/python2.7/httplib.py:882: in _send_output > self.send(msg) >/usr/lib64/python2.7/httplib.py:844: in send > self.connect() >wsgi_intercept/__init__.py:546: in connect > HTTPConnection.connect(self) >/usr/lib64/python2.7/httplib.py:821: in connect > self.timeout, self.source_address) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >address = ('_nonexistant_domain_', 80) >timeout = <object object at 0x7f3843d2c0e0>, source_address = None > > def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, > source_address=None): > """Connect to *address* and return the socket object. > > Convenience function. Connect to *address* (a 2-tuple ``(host, > port)``) and return the socket object. Passing the optional > *timeout* parameter will set the timeout on the socket instance > before attempting to connect. If no *timeout* is supplied, the > global default timeout setting returned by :func:`getdefaulttimeout` > is used. If *source_address* is set it must be a tuple of (host, port) > for the socket to bind as a source address before making the connection. > A host of '' or port 0 tells the OS to use the default. > """ > > host, port = address > err = None >> for res in getaddrinfo(host, port, 0, SOCK_STREAM): >E ProtocolError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution')) > >/usr/lib64/python2.7/socket.py:557: ProtocolError >------------------------------ Captured log call ------------------------------- >retry.py 200 DEBUG Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None) >connectionpool.py 207 DEBUG Starting new HTTP connection (1): _nonexistant_domain_ >__________________________ test_http_not_intercepted ___________________________ > > @skipnetwork > def test_http_not_intercepted(): > with InstalledApp(wsgi_app.raises_app, host=HOST, port=80): >> resp = http.request('GET', 'http://google.com') > >test/test_urllib3.py:82: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/usr/lib64/python2.7/site-packages/urllib3/request.py:66: in request > **urlopen_kw) >/usr/lib64/python2.7/site-packages/urllib3/request.py:87: in request_encode_url > return self.urlopen(method, url, **extra_kw) >/usr/lib64/python2.7/site-packages/urllib3/poolmanager.py:321: in urlopen > response = conn.urlopen(method, u.request_uri, **kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:678: in urlopen > **response_kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:678: in urlopen > **response_kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:678: in urlopen > **response_kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:649: in urlopen > _stacktrace=sys.exc_info()[2]) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = Retry(total=0, connect=None, read=None, redirect=None, status=None) >method = 'GET', url = '/', response = None >error = ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution')) >_pool = <urllib3.connectionpool.HTTPConnectionPool object at 0x7f3838efed90> >_stacktrace = <traceback object at 0x7f38395fab00> > > def increment(self, method=None, url=None, response=None, error=None, > _pool=None, _stacktrace=None): > """ Return a new Retry object with incremented retry counters. > > :param response: A response object, or None, if the server did not > return a response. > :type response: :class:`~urllib3.response.HTTPResponse` > :param Exception error: An error encountered during the request, or > None if the response was received successfully. > > :return: A new ``Retry`` object. > """ > if self.total is False and error: > # Disabled, indicate to re-raise the error. > raise six.reraise(type(error), error, _stacktrace) > > total = self.total > if total is not None: > total -= 1 > > connect = self.connect > read = self.read > redirect = self.redirect > status_count = self.status > cause = 'unknown' > status = None > redirect_location = None > > if error and self._is_connection_error(error): > # Connect retry? > if connect is False: > raise six.reraise(type(error), error, _stacktrace) > elif connect is not None: > connect -= 1 > > elif error and self._is_read_error(error): > # Read retry? > if read is False or not self._is_method_retryable(method): > raise six.reraise(type(error), error, _stacktrace) > elif read is not None: > read -= 1 > > elif response and response.get_redirect_location(): > # Redirect retry? > if redirect is not None: > redirect -= 1 > cause = 'too many redirects' > redirect_location = response.get_redirect_location() > status = response.status > > else: > # Incrementing because of a server error like a 500 in > # status_forcelist and a the given method is in the whitelist > cause = ResponseError.GENERIC_ERROR > if response and response.status: > if status_count is not None: > status_count -= 1 > cause = ResponseError.SPECIFIC_ERROR.format( > status_code=response.status) > status = response.status > > history = self.history + (RequestHistory(method, url, error, status, redirect_location),) > > new_retry = self.new( > total=total, > connect=connect, read=read, redirect=redirect, status=status_count, > history=history) > > if new_retry.is_exhausted(): >> raise MaxRetryError(_pool, url, error or ResponseError(cause)) >E MaxRetryError: HTTPConnectionPool(host='google.com', port=80): Max retries exceeded with url: / (Caused by ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))) > >/usr/lib64/python2.7/site-packages/urllib3/util/retry.py:388: MaxRetryError >------------------------------ Captured log call ------------------------------- >connectionpool.py 207 DEBUG Starting new HTTP connection (1): google.com >retry.py 390 DEBUG Incremented Retry for (url='/'): Retry(total=2, connect=None, read=None, redirect=None, status=None) >connectionpool.py 673 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': / >connectionpool.py 207 DEBUG Starting new HTTP connection (2): google.com >retry.py 390 DEBUG Incremented Retry for (url='/'): Retry(total=1, connect=None, read=None, redirect=None, status=None) >connectionpool.py 673 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': / >connectionpool.py 207 DEBUG Starting new HTTP connection (3): google.com >retry.py 390 DEBUG Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None, status=None) >connectionpool.py 673 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': / >connectionpool.py 207 DEBUG Starting new HTTP connection (4): google.com >__________________________ test_https_not_intercepted __________________________ > > @skipnetwork > def test_https_not_intercepted(): > with InstalledApp(wsgi_app.raises_app, host=HOST, port=80): >> resp = http.request('GET', 'https://google.com') > >test/test_urllib3.py:89: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >/usr/lib64/python2.7/site-packages/urllib3/request.py:66: in request > **urlopen_kw) >/usr/lib64/python2.7/site-packages/urllib3/request.py:87: in request_encode_url > return self.urlopen(method, url, **extra_kw) >/usr/lib64/python2.7/site-packages/urllib3/poolmanager.py:321: in urlopen > response = conn.urlopen(method, u.request_uri, **kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:678: in urlopen > **response_kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:678: in urlopen > **response_kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:678: in urlopen > **response_kw) >/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py:649: in urlopen > _stacktrace=sys.exc_info()[2]) >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = Retry(total=0, connect=None, read=None, redirect=None, status=None) >method = 'GET', url = '/', response = None >error = ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution')) >_pool = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f3838d9f690> >_stacktrace = <traceback object at 0x7f3838f69368> > > def increment(self, method=None, url=None, response=None, error=None, > _pool=None, _stacktrace=None): > """ Return a new Retry object with incremented retry counters. > > :param response: A response object, or None, if the server did not > return a response. > :type response: :class:`~urllib3.response.HTTPResponse` > :param Exception error: An error encountered during the request, or > None if the response was received successfully. > > :return: A new ``Retry`` object. > """ > if self.total is False and error: > # Disabled, indicate to re-raise the error. > raise six.reraise(type(error), error, _stacktrace) > > total = self.total > if total is not None: > total -= 1 > > connect = self.connect > read = self.read > redirect = self.redirect > status_count = self.status > cause = 'unknown' > status = None > redirect_location = None > > if error and self._is_connection_error(error): > # Connect retry? > if connect is False: > raise six.reraise(type(error), error, _stacktrace) > elif connect is not None: > connect -= 1 > > elif error and self._is_read_error(error): > # Read retry? > if read is False or not self._is_method_retryable(method): > raise six.reraise(type(error), error, _stacktrace) > elif read is not None: > read -= 1 > > elif response and response.get_redirect_location(): > # Redirect retry? > if redirect is not None: > redirect -= 1 > cause = 'too many redirects' > redirect_location = response.get_redirect_location() > status = response.status > > else: > # Incrementing because of a server error like a 500 in > # status_forcelist and a the given method is in the whitelist > cause = ResponseError.GENERIC_ERROR > if response and response.status: > if status_count is not None: > status_count -= 1 > cause = ResponseError.SPECIFIC_ERROR.format( > status_code=response.status) > status = response.status > > history = self.history + (RequestHistory(method, url, error, status, redirect_location),) > > new_retry = self.new( > total=total, > connect=connect, read=read, redirect=redirect, status=status_count, > history=history) > > if new_retry.is_exhausted(): >> raise MaxRetryError(_pool, url, error or ResponseError(cause)) >E MaxRetryError: HTTPSConnectionPool(host='google.com', port=443): Max retries exceeded with url: / (Caused by ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))) > >/usr/lib64/python2.7/site-packages/urllib3/util/retry.py:388: MaxRetryError >------------------------------ Captured log call ------------------------------- >connectionpool.py 818 DEBUG Starting new HTTPS connection (1): google.com >retry.py 390 DEBUG Incremented Retry for (url='/'): Retry(total=2, connect=None, read=None, redirect=None, status=None) >connectionpool.py 673 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': / >connectionpool.py 818 DEBUG Starting new HTTPS connection (2): google.com >retry.py 390 DEBUG Incremented Retry for (url='/'): Retry(total=1, connect=None, read=None, redirect=None, status=None) >connectionpool.py 673 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': / >connectionpool.py 818 DEBUG Starting new HTTPS connection (3): google.com >retry.py 390 DEBUG Incremented Retry for (url='/'): Retry(total=0, connect=None, read=None, redirect=None, status=None) >connectionpool.py 673 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))': / >connectionpool.py 818 DEBUG Starting new HTTPS connection (4): google.com >____________________________ 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') > >test/test_wsgi_compliance.py:37: >_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > >self = <httplib2.Http object at 0x7f3838efe810> >uri = 'https://some_hopefully_nonexistant_domain/', method = 'GET', body = None >headers = {'user-agent': 'Python-httplib2/0.10.3 (gzip)'}, redirections = 5 >connection_type = <class wsgi_intercept.httplib2_intercept.HTTPS_WSGIInterceptorWithTimeout at 0x7f383a5e4808> > > 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. > """ > try: > if headers is None: > headers = {} > else: > headers = self._normalize_headers(headers) > > if not headers.has_key('user-agent'): > headers['user-agent'] = "Python-httplib2/%s (gzip)" % __version__ > > uri = iri2uri(uri) > > (scheme, authority, request_uri, defrag_uri) = urlnorm(uri) > domain_port = authority.split(":")[0:2] > if len(domain_port) == 2 and domain_port[1] == '443' and scheme == 'http': > scheme = 'https' > authority = domain_port[0] > > proxy_info = self._get_proxy_info(scheme, authority) > > conn_key = scheme+":"+authority > if conn_key in self.connections: > conn = self.connections[conn_key] > else: > if not connection_type: > connection_type = SCHEME_TO_CONNECTION[scheme] > certs = list(self.certificates.iter(authority)) > if scheme == 'https': > 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=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, > ssl_version=self.ssl_version) > else: > conn = self.connections[conn_key] = connection_type( > authority, timeout=self.timeout, > proxy_info=proxy_info, > ca_certs=self.ca_certs, > disable_ssl_certificate_validation= > self.disable_ssl_certificate_validation, >> ssl_version=self.ssl_version) >E TypeError: __init__() got an unexpected keyword argument 'ssl_version' > >/usr/lib64/python2.7/site-packages/httplib2/__init__.py:1537: TypeError >===================== 8 failed, 57 passed in 2.13 seconds ====================== > * ERROR: dev-python/wsgiintercept-1.3.1::gentoo failed (test phase): > * Tests failed under python2.7 > * > * Call stack: > * ebuild.sh, line 115: Called src_test > * environment, line 2713: Called distutils-r1_src_test > * environment, line 886: Called _distutils-r1_run_foreach_impl 'python_test' > * environment, line 332: Called python_foreach_impl 'distutils-r1_run_phase' 'python_test' > * environment, line 2225: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 1527: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'python_test' > * environment, line 1525: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'python_test' > * environment, line 556: Called distutils-r1_run_phase 'python_test' > * environment, line 817: Called python_test > * environment, line 2593: Called die > * The specific snippet of code: > * py.test || die "Tests failed under ${EPYTHON}" > * > * If you need support, post the output of `emerge --info '=dev-python/wsgiintercept-1.3.1::gentoo'`, > * the complete build log and the output of `emerge -pqv '=dev-python/wsgiintercept-1.3.1::gentoo'`. > * The complete build log is located at '/var/log/portage/dev-python:wsgiintercept-1.3.1:20170701-180931.log'. > * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-python/wsgiintercept-1.3.1/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/dev-python/wsgiintercept-1.3.1/temp/environment'. > * Working directory: '/var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1' > * S: '/var/tmp/portage/dev-python/wsgiintercept-1.3.1/work/wsgi_intercept-1.3.1'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 623356
:
479108
| 479110 |
479112
|
479114
|
479116
|
479118