@@ -210,7 +210,7 @@ def urlretrieve(url, filename=None, reporthook=None, data=None):
210210    url_type , path  =  _splittype (url )
211211
212212    with  contextlib .closing (urlopen (url , data )) as  fp :
213-         headers  =  fp .info () 
213+         headers  =  fp .headers 
214214
215215        # Just return the local path and the "headers" for file:// 
216216        # URLs. No sense in performing a copy unless requested. 
@@ -594,7 +594,7 @@ class HTTPErrorProcessor(BaseHandler):
594594    handler_order  =  1000   # after all other processing 
595595
596596    def  http_response (self , request , response ):
597-         code , msg , hdrs  =  response .code , response .msg , response .info () 
597+         code , msg , hdrs  =  response .status , response .msg , response .headers 
598598
599599        # According to RFC 2616, "2xx" code indicates that the client's 
600600        # request was successfully received, understood, and accepted. 
@@ -1338,8 +1338,7 @@ def do_open(self, http_class, req, **http_conn_args):
13381338        # This line replaces the .msg attribute of the HTTPResponse 
13391339        # with .headers, because urllib clients expect the response to 
13401340        # have the reason in .msg.  It would be good to mark this 
1341-         # attribute is deprecated and get then to use info() or 
1342-         # .headers. 
1341+         # attribute is deprecated and get then to use .headers. 
13431342        r .msg  =  r .reason 
13441343        return  r 
13451344
0 commit comments