Home - Summaries: (main) : (py3.11) : (py3.12) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

rlib/rvmprof/test/test_file.py::test_same_file

def test_same_file():
        shared = RVMPROF.join('src', 'shared')
        files = get_list_of_files(shared)
        assert files, 'cannot find any C file, probably the directory is wrong?'
        no_matches = []
        print
        for file in files:
            path = file.relto(shared)
            url = github_raw_file("vmprof/vmprof-python", "src/%s" % path)
>           source = urllib2.urlopen(url).read()

rlib/rvmprof/test/test_file.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../../../hostedtoolcache/PyPy/2.7.18/arm64/lib-python/2.7/urllib2.py:154: in urlopen
    return opener.open(url, data, timeout)
../../../../hostedtoolcache/PyPy/2.7.18/arm64/lib-python/2.7/urllib2.py:429: in open
    response = self._open(req, data)
../../../../hostedtoolcache/PyPy/2.7.18/arm64/lib-python/2.7/urllib2.py:447: in _open
    '_open', req)
../../../../hostedtoolcache/PyPy/2.7.18/arm64/lib-python/2.7/urllib2.py:407: in _call_chain
    result = func(*args)
../../../../hostedtoolcache/PyPy/2.7.18/arm64/lib-python/2.7/urllib2.py:1285: in https_open
    context=self._context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <urllib2.HTTPSHandler instance at 0x0000000ac9c18c60>
http_class = <class httplib.HTTPSConnection at 0x0000000ac7ae5a28>
req = <urllib2.Request instance at 0x0000000ac78ca020>
http_conn_args = {'context': None}, host = 'raw.githubusercontent.com'
h = <httplib.HTTPSConnection instance at 0x0000000ac78ca060>
err = gaierror(8, 'nodename nor servname provided, or not known')

    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 8] nodename nor servname provided, or not known>

../../../../hostedtoolcache/PyPy/2.7.18/arm64/lib-python/2.7/urllib2.py:1234: URLError
---------- Captured stdout call ----------

 (somefailed=True in rlib/rvmprof/test/test_file.py)
builder: rpython-macos-arm64 build #825*
test: rlib/rvmprof/test/test_file.py::test_same_file