[Debian-astro-maintainers] Bug#887531: python-asdf FTBFS: test failures

Adrian Bunk bunk at debian.org
Wed Jan 17 19:01:04 UTC 2018


Source: python-asdf
Version: 1.3.1-1
Severity: serious

Some recent change in unstable makes python-asdf FTBFS:

https://tests.reproducible-builds.org/debian/history/python-asdf.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/python-asdf.html

...
=================================== FAILURES ===================================
_____________________________ test_urlopen[tree0] ______________________________

tree = {'not_shared': array([10,  9,  8,  7,  6,  5,  4,  3,  2,  1], dtype=uint8), 'science_data': array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.]), 'skipping': array([ 0.,  2.,  4.,  6.,  8.]), 'subset': array([ 3.,  4.,  5.,  6.])}
httpserver = <asdf.conftest.HTTPServer object at 0x7f353b5fdb50>

    @pytest.mark.skipif(INTERNET_OFF, reason="Astropy has disabled internet access")
    @pytest.mark.skipif(sys.platform.startswith('win'),
                        reason="Windows firewall prevents test")
    def test_urlopen(tree, httpserver):
        path = os.path.join(httpserver.tmpdir, 'test.asdf')
    
        def get_write_fd():
            return generic_io.get_file(open(path, 'wb'), mode='w')
    
        def get_read_fd():
            return generic_io.get_file(
                urllib_request.urlopen(
                    httpserver.url + "test.asdf"))
    
>       with _roundtrip(tree, get_write_fd, get_read_fd) as ff:

asdf/tests/test_generic_io.py:270: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
asdf/tests/test_generic_io.py:72: in _roundtrip
    with get_read_fd() as fd:
asdf/tests/test_generic_io.py:268: in get_read_fd
    httpserver.url + "test.asdf"))
/usr/lib/python2.7/urllib2.py:154: in urlopen
    return opener.open(url, data, timeout)
/usr/lib/python2.7/urllib2.py:429: in open
    response = self._open(req, data)
/usr/lib/python2.7/urllib2.py:447: in _open
    '_open', req)
/usr/lib/python2.7/urllib2.py:407: in _call_chain
    result = func(*args)
/usr/lib/python2.7/urllib2.py:1228: in http_open
    return self.do_open(httplib.HTTPConnection, req)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib2.HTTPHandler instance at 0x7f353b4701b8>
http_class = <class httplib.HTTPConnection at 0x7f3546f6f3f8>
req = <urllib2.Request instance at 0x7f353b4c8e18>, http_conn_args = {}
host = '127.0.0.1:9', h = <httplib.HTTPConnection instance at 0x7f353b46fb00>
err = error(111, 'Connection refused')

    def do_open(self, http_class, req, **http_conn_args):
        """Return an addinfourl object for the request, using http_class.
    
            http_class must implement the HTTPConnection API from httplib.
            The addinfourl return value is a file-like object.  It also
            has methods and attributes including:
                - info(): return a mimetools.Message object for the headers
                - geturl(): return the original request URL
                - code: HTTP status code
            """
        host = req.get_host()
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update(dict((k, v) for k, v in req.headers.items()
                            if k not in headers))
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = dict(
            (name.title(), val) for name, val in headers.items())
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            h.request(req.get_method(), req.get_selector(), req.data, headers)
        except socket.error, err: # XXX what error?
            h.close()
>           raise URLError(err)
E           URLError: <urlopen error [Errno 111] Connection refused>

/usr/lib/python2.7/urllib2.py:1198: URLError
_____________________________ test_urlopen[tree1] ______________________________

tree = {'more': array([[[ 0.5047124 ,  0.67230725,  0.54438082, ...,  0.6181783 ,
          0.....86328092,  0.20516376, ...,...738, ...,  0.77406934,
         0.85... 0.98452297,  0.2701272 , ...,  0.70554981,
         0.99484383,  0.83053795]])}
httpserver = <asdf.conftest.HTTPServer object at 0x7f353b1149d0>

    @pytest.mark.skipif(INTERNET_OFF, reason="Astropy has disabled internet access")
    @pytest.mark.skipif(sys.platform.startswith('win'),
                        reason="Windows firewall prevents test")
    def test_urlopen(tree, httpserver):
        path = os.path.join(httpserver.tmpdir, 'test.asdf')
    
        def get_write_fd():
            return generic_io.get_file(open(path, 'wb'), mode='w')
    
        def get_read_fd():
            return generic_io.get_file(
                urllib_request.urlopen(
                    httpserver.url + "test.asdf"))
    
>       with _roundtrip(tree, get_write_fd, get_read_fd) as ff:

asdf/tests/test_generic_io.py:270: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
asdf/tests/test_generic_io.py:72: in _roundtrip
    with get_read_fd() as fd:
asdf/tests/test_generic_io.py:268: in get_read_fd
    httpserver.url + "test.asdf"))
/usr/lib/python2.7/urllib2.py:154: in urlopen
    return opener.open(url, data, timeout)
/usr/lib/python2.7/urllib2.py:429: in open
    response = self._open(req, data)
/usr/lib/python2.7/urllib2.py:447: in _open
    '_open', req)
/usr/lib/python2.7/urllib2.py:407: in _call_chain
    result = func(*args)
/usr/lib/python2.7/urllib2.py:1228: in http_open
    return self.do_open(httplib.HTTPConnection, req)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib2.HTTPHandler instance at 0x7f353b4701b8>
http_class = <class httplib.HTTPConnection at 0x7f3546f6f3f8>
req = <urllib2.Request instance at 0x7f353b4ec290>, http_conn_args = {}
host = '127.0.0.1:9', h = <httplib.HTTPConnection instance at 0x7f353b4ece60>
err = error(111, 'Connection refused')

    def do_open(self, http_class, req, **http_conn_args):
        """Return an addinfourl object for the request, using http_class.
    
            http_class must implement the HTTPConnection API from httplib.
            The addinfourl return value is a file-like object.  It also
            has methods and attributes including:
                - info(): return a mimetools.Message object for the headers
                - geturl(): return the original request URL
                - code: HTTP status code
            """
        host = req.get_host()
        if not host:
            raise URLError('no host given')
    
        # will parse host:port
        h = http_class(host, timeout=req.timeout, **http_conn_args)
        h.set_debuglevel(self._debuglevel)
    
        headers = dict(req.unredirected_hdrs)
        headers.update(dict((k, v) for k, v in req.headers.items()
                            if k not in headers))
    
        # We want to make an HTTP/1.1 request, but the addinfourl
        # class isn't prepared to deal with a persistent connection.
        # It will try to read all remaining data from the socket,
        # which will block while the server waits for the next request.
        # So make sure the connection gets closed after the (only)
        # request.
        headers["Connection"] = "close"
        headers = dict(
            (name.title(), val) for name, val in headers.items())
    
        if req._tunnel_host:
            tunnel_headers = {}
            proxy_auth_hdr = "Proxy-Authorization"
            if proxy_auth_hdr in headers:
                tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
                # Proxy-Authorization should not be sent to origin
                # server.
                del headers[proxy_auth_hdr]
            h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
    
        try:
            h.request(req.get_method(), req.get_selector(), req.data, headers)
        except socket.error, err: # XXX what error?
            h.close()
>           raise URLError(err)
E           URLError: <urlopen error [Errno 111] Connection refused>

/usr/lib/python2.7/urllib2.py:1198: URLError
______________________________ test_internet_off _______________________________

    def test_internet_off():
        if not _REMOTE_DATA:
>           assert INTERNET_OFF == True
E           assert False == True

asdf/tests/test_remote_data.py:22: AssertionError
=============== 3 failed, 493 passed, 6 skipped in 37.71 seconds ===============
debian/rules:28: recipe for target 'test-python2.7' failed
make[1]: *** [test-python2.7] Error 1



More information about the Debian-astro-maintainers mailing list